#include <properties.h>
Definition at line 32 of file properties.h.
Public Member Functions | |
virtual | ~Properties () |
Destructor. | |
const std::string & | getProperty (const std::string &name, const std::string &def="") const |
Get a map property. | |
float | getFloatProperty (const std::string &name, float def=0.0f) const |
Gets a map property as a float. | |
bool | hasProperty (const std::string &name) const |
Returns whether a certain property is available. | |
void | setProperty (const std::string &name, const std::string &value) |
Set a map property. | |
Private Types | |
typedef std::map< std::string, std::string > | PropertyMap |
Private Attributes | |
PropertyMap | mProperties |
typedef std::map<std::string, std::string> Properties::PropertyMap [private] |
Definition at line 100 of file properties.h.
virtual Properties::~Properties | ( | ) | [inline, virtual] |
const std::string& Properties::getProperty | ( | const std::string & | name, | |
const std::string & | def = "" | |||
) | const [inline] |
Get a map property.
name | The name of the property. | |
def | Default value, empty string by default. |
Definition at line 48 of file properties.h.
float Properties::getFloatProperty | ( | const std::string & | name, | |
float | def = 0.0f | |||
) | const [inline] |
Gets a map property as a float.
name | The name of the property. | |
def | Default value, 0.0f by default. |
Definition at line 63 of file properties.h.
bool Properties::hasProperty | ( | const std::string & | name | ) | const [inline] |
Returns whether a certain property is available.
name | The name of the property. |
true
when a property is defined, false
otherwise. Definition at line 83 of file properties.h.
void Properties::setProperty | ( | const std::string & | name, | |
const std::string & | value | |||
) | [inline] |
Set a map property.
name | The name of the property. | |
value | The value of the property. |
Definition at line 94 of file properties.h.
PropertyMap Properties::mProperties [private] |
Definition at line 101 of file properties.h.