#include <gxProperties.h>
Public Types | |
typedef std::list< std::string > | keys_t |
Public Member Functions | |
gxProperties () | |
virtual | ~gxProperties () |
void | clear () |
Clears this collection of properties so that it has no keys/values. | |
bool | containsKey (const char *key) |
Tests whether this collection contains a property with the specified key. | |
std::string | get (const char *key, const char *defaultValue="") |
Get the specified property. | |
std::string | get (const std::string &key, const char *defaultValue="") |
Convenience overload of "get" when building keys from STD strings. | |
keys_t | keys () |
Return a list of all keys in the collection. | |
void | put (const char *key, const char *value) |
Puts the specified property into the collection at the specified key. | |
void | put (const char *key, long value) |
Puts the specified integer property into the collection at the specified key. | |
void | put (const std::string &key, const char *value) |
Convenience overload of "put" when building keys from STD strings. | |
void | put (const std::string &key, long value) |
Convenience overload of "put" when building keys from STD strings. | |
int | size () |
Return the size of the collection (number of keys). |
This class is loosely inspired by java.util.Properties, but has fewer features.
The initial motivation for this class was to store properties about audio cards - buffer size, sample rate etc. and to simplify the process of converting this information to/from XML.
|
|
|
|
|
|
|
Clears this collection of properties so that it has no keys/values.
|
|
Tests whether this collection contains a property with the specified key.
|
|
Convenience overload of "get" when building keys from STD strings.
|
|
Get the specified property.
|
|
Return a list of all keys in the collection.
|
|
Convenience overload of "put" when building keys from STD strings.
|
|
Convenience overload of "put" when building keys from STD strings.
|
|
Puts the specified integer property into the collection at the specified key.
|
|
Puts the specified property into the collection at the specified key.
|
|
Return the size of the collection (number of keys).
|