Murl::IPreferencesControl Interface Referenceabstract
The IPreferencesControl interface. More...
#include "murl_i_preferences_control.h"
Inheritance diagram for Murl::IPreferencesControl:
Public Member Functions | |
virtual Bool | Exists (const String &key) const =0 |
Check if a given key exists in the preferences. More... | |
virtual String | GetValue (const String &key) const =0 |
Get the value from a preference item with a given key. More... | |
virtual Bool | GetValue (const String &key, String &value) const =0 |
Get the value from a preference item with a given key. More... | |
virtual Bool | SetValue (const String &key, const String &value)=0 |
Set the value to a preference item with a given key. More... | |
virtual Bool | GetData (const String &key, Data &value) const =0 |
Get binary data from a preference item with a given key. More... | |
virtual Bool | SetData (const String &key, const Data &value)=0 |
Set binary data to a preference item with a given key. More... | |
virtual Bool | Remove (const String &key)=0 |
Remove an preference item for a given key. More... | |
Public Member Functions inherited from Murl::IControlable | |
virtual const String & | GetName () const =0 |
Get the controlable's name. More... | |
virtual void | FrameUpdate ()=0 |
Is executed in the platform thread context each frame tick. | |
virtual void | LogicUpdate ()=0 |
Is executed in the logic thread context each logic tick. | |
virtual void | ConfigChanged (const IAppConfiguration *appConfig)=0 |
Notification of changed configuration. More... | |
Detailed Description
The IPreferencesControl interface.
The IPreferencesControl implements operating system dependent preferences, limitations to the number of keys and size of the keys should be considered.
- iOS / tvOS / OSX uses standardUserDefaults from NSUserDefaults
- Android uses SharedPreferences from Activity
- Windows uses Registry entries
Member Function Documentation
◆ Exists()
Check if a given key exists in the preferences.
- Parameters
-
key The item key to check.
- Returns
- true if the key exists.
◆ GetValue() [1/2]
Get the value from a preference item with a given key.
- Parameters
-
key The item key to query.
- Returns
- The value of the item, or an empty string if the key does not exist or the key does not contain a string.
◆ GetValue() [2/2]
|
pure virtual |
Get the value from a preference item with a given key.
- Parameters
-
key The item key to query. value The string return value.
- Returns
- true if successful, false if the key does not exist or the key does not contain a string. If false the 'value' return value stays unchanged.
◆ SetValue()
|
pure virtual |
Set the value to a preference item with a given key.
- Parameters
-
key The item key to set. value The item's new value.
- Returns
- true if successful.
◆ GetData()
|
pure virtual |
Get binary data from a preference item with a given key.
- Parameters
-
key The item key to query. value The data return value.
- Returns
- true if successful, false if the key does not exist or the key does not contain binary data. If false the 'value' return value stays unchanged.
◆ SetData()
|
pure virtual |
Set binary data to a preference item with a given key.
- Parameters
-
key The item key to set. value The item's new binary data.
- Returns
- true if successful.
◆ Remove()
Remove an preference item for a given key.
- Parameters
-
key The item key to reomve.
- Returns
- true if successful, false if the key does not exist.
The documentation for this interface was generated from the following file:
- murl_i_preferences_control.h