Open Lighting Architecture
0.9.1
|
Public Member Functions | |
MemoryPreferences (const std::string name) | |
virtual bool | Load () |
virtual bool | Save () const |
virtual void | Clear () |
virtual std::string | Source () const |
The location of where these preferences are stored. | |
virtual void | SetValue (const std::string &key, const std::string &value) |
Set a preference value, overriding the existing value. | |
virtual void | SetValue (const std::string &key, unsigned int value) |
Set a preference value, overriding the existing value. This helper accepts an unsigned int. | |
virtual void | SetValue (const std::string &key, int value) |
Set a preference value, overriding the existing value. This helper accepts an int. | |
virtual void | SetMultipleValue (const std::string &key, const std::string &value) |
Adds this preference value to the store. | |
virtual void | SetMultipleValue (const std::string &key, unsigned int value) |
Adds this preference value to the store. This helper accepts an unsigned int. | |
virtual void | SetMultipleValue (const std::string &key, int value) |
Adds this preference value to the store. This helper accepts an int. | |
virtual bool | SetDefaultValue (const std::string &key, const Validator &validator, const std::string &value) |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator. | |
virtual bool | SetDefaultValue (const std::string &key, const Validator &validator, unsigned int value) |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator. This helper accepts an unsigned int value. | |
virtual bool | SetDefaultValue (const std::string &key, const Validator &validator, int value) |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator. This helper accepts an int value. | |
virtual std::string | GetValue (const std::string &key) const |
Get a preference value. | |
virtual std::vector< std::string > | GetMultipleValue (const std::string &key) const |
Returns all preference values corrosponding to this key. | |
virtual bool | HasKey (const std::string &key) const |
Check if a preference key exists. | |
virtual void | RemoveValue (const std::string &key) |
Remove a preference value. | |
virtual bool | GetValueAsBool (const std::string &key) const |
Get a preference value as a bool. | |
virtual void | SetValueAsBool (const std::string &key, bool value) |
Set a value as a bool. | |
bool | operator== (const MemoryPreferences &other) |
Public Member Functions inherited from ola::Preferences | |
Preferences (const std::string name) | |
virtual | ~Preferences () |
Protected Types | |
typedef std::multimap < std::string, std::string > | PreferencesMap |
Protected Attributes | |
PreferencesMap | m_pref_map |
Protected Attributes inherited from ola::Preferences | |
std::string | m_preference_name |
|
virtual |
Clear the preferences
Implements ola::Preferences.
|
virtual |
Returns all preference values corrosponding to this key.
key | the key to fetch |
Implements ola::Preferences.
|
virtual |
Get a preference value.
key | the key to fetch |
Implements ola::Preferences.
|
virtual |
Get a preference value as a bool.
key | the key to fetch |
Implements ola::Preferences.
|
virtual |
Check if a preference key exists.
key | the key to check |
Implements ola::Preferences.
|
inlinevirtual |
Load the preferences from storage
Implements ola::Preferences.
Reimplemented in ola::FileBackedPreferences.
|
virtual |
|
inlinevirtual |
Save the preferences to storage
Implements ola::Preferences.
Reimplemented in ola::FileBackedPreferences.
|
virtual |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator.
key | the key to check/set |
validator | A Validator object |
value | the new value |
Implements ola::Preferences.
|
virtual |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator. This helper accepts an unsigned int value.
key | the key to check/set |
validator | A Validator object |
value | the new value |
Implements ola::Preferences.
|
virtual |
Set a preference value if it doesn't already exist, or if it exists and doesn't pass the validator. This helper accepts an int value.
key | the key to check/set |
validator | A Validator object |
value | the new value |
Implements ola::Preferences.
|
virtual |
|
virtual |
Adds this preference value to the store. This helper accepts an unsigned int.
key | |
value |
Implements ola::Preferences.
|
virtual |
Adds this preference value to the store. This helper accepts an int.
key | |
value |
Implements ola::Preferences.
|
virtual |
Set a preference value, overriding the existing value.
key | |
value |
Implements ola::Preferences.
|
virtual |
Set a preference value, overriding the existing value. This helper accepts an unsigned int.
key | |
value |
Implements ola::Preferences.
|
virtual |
Set a preference value, overriding the existing value. This helper accepts an int.
key | |
value |
Implements ola::Preferences.
|
virtual |
|
inlinevirtual |
The location of where these preferences are stored.
Implements ola::Preferences.
Reimplemented in ola::FileBackedPreferences.