gatb.core-API-0.0.0
|
Definition of a property as a [key,value] entry with a given depth. More...
#include <IProperty.hpp>
Public Member Functions | |
IProperty (size_t aDepth, const std::string &aKey, const std::string &aValue) | |
IProperty (const std::string &aKey="", const std::string &aValue="") | |
const std::string & | getValue () |
long | getInt () |
double | getDouble () |
const char * | getString () |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Public Attributes | |
size_t | depth |
std::string | key |
std::string | value |
Additional Inherited Members | |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Definition of a property as a [key,value] entry with a given depth.
Define what a property can be. This is an extension of the [key,value] concept since we add a notion a depth to this couple, which makes possible to have a tree vision of a simple list of [depth,key,value] entries.
Such instances are managed by the IProperties class, that acts as a container of IProperty instances.
|
inline |
Constructor.
[in] | aDepth | : depth of the [key,value] |
[in] | aKey | : the key |
[in] | aValue | : the value |
|
inline |
Constructor.
[in] | aKey | : the key |
[in] | aValue | : the value |
|
inline |
Returns the value of the property as a float (it supposes that the string represents an float).
|
inline |
Returns the value of the property as an integer (it supposes that the string represents an integer).
|
inline |
Returns the value of the property as a C string.
|
inline |
Returns the value of the property as a C++ string.
size_t depth |
Depth of the property. 0 should mean root property.
std::string key |
Key of the property as a string.
std::string value |
Value of the property as a string.