Open Lighting Architecture
0.9.3
|
Public Member Functions | |
Preferences (const std::string name) | |
virtual | ~Preferences () |
virtual bool | Load ()=0 |
virtual bool | Save () const =0 |
virtual void | Clear ()=0 |
virtual std::string | Source () const =0 |
The location of where these preferences are stored. | |
virtual void | SetValue (const std::string &key, const std::string &value)=0 |
Set a preference value, overriding the existing value. | |
virtual void | SetValue (const std::string &key, unsigned int value)=0 |
Set a preference value, overriding the existing value. This helper accepts an unsigned int. | |
virtual void | SetValue (const std::string &key, int value)=0 |
Set a preference value, overriding the existing value. This helper accepts an int. | |
virtual void | SetMultipleValue (const std::string &key, const std::string &value)=0 |
Adds this preference value to the store. | |
virtual void | SetMultipleValue (const std::string &key, unsigned int value)=0 |
Adds this preference value to the store. This helper accepts an unsigned int. | |
virtual void | SetMultipleValue (const std::string &key, int value)=0 |
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)=0 |
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)=0 |
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)=0 |
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 =0 |
Get a preference value. | |
virtual std::vector< std::string > | GetMultipleValue (const std::string &key) const =0 |
Returns all preference values corrosponding to this key. | |
virtual bool | HasKey (const std::string &key) const =0 |
Check if a preference key exists. | |
virtual void | RemoveValue (const std::string &key)=0 |
Remove a preference value. | |
virtual bool | GetValueAsBool (const std::string &key) const =0 |
Get a preference value as a bool. | |
virtual void | SetValueAsBool (const std::string &key, bool value)=0 |
Set a value as a bool. |
Protected Attributes | |
std::string | m_preference_name |
|
inlinevirtual |
Destroy this object
|
pure virtual |
Clear the preferences
Implemented in ola::MemoryPreferences.
|
pure virtual |
Returns all preference values corrosponding to this key.
key | the key to fetch |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Get a preference value.
key | the key to fetch |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Get a preference value as a bool.
key | the key to fetch |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Check if a preference key exists.
key | the key to check |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Load the preferences from storage
Implemented in ola::FileBackedPreferences, and ola::MemoryPreferences.
|
pure virtual |
|
pure virtual |
Save the preferences to storage
Implemented in ola::FileBackedPreferences, and ola::MemoryPreferences.
|
pure 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 |
Implemented in ola::MemoryPreferences.
|
pure 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 |
Implemented in ola::MemoryPreferences.
|
pure 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 |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Adds this preference value to the store.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Adds this preference value to the store. This helper accepts an unsigned int.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Adds this preference value to the store. This helper accepts an int.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Set a preference value, overriding the existing value.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Set a preference value, overriding the existing value. This helper accepts an unsigned int.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
Set a preference value, overriding the existing value. This helper accepts an int.
key | |
value |
Implemented in ola::MemoryPreferences.
|
pure virtual |
|
pure virtual |
The location of where these preferences are stored.
Implemented in ola::FileBackedPreferences, and ola::MemoryPreferences.