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 StringGetName () 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()

virtual Bool Murl::IPreferencesControl::Exists ( const String key) const
pure virtual

Check if a given key exists in the preferences.

Parameters
keyThe item key to check.
Returns
true if the key exists.

◆ GetValue() [1/2]

virtual String Murl::IPreferencesControl::GetValue ( const String key) const
pure virtual

Get the value from a preference item with a given key.

Parameters
keyThe 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]

virtual Bool Murl::IPreferencesControl::GetValue ( const String key,
String value 
) const
pure virtual

Get the value from a preference item with a given key.

Parameters
keyThe item key to query.
valueThe 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()

virtual Bool Murl::IPreferencesControl::SetValue ( const String key,
const String value 
)
pure virtual

Set the value to a preference item with a given key.

Parameters
keyThe item key to set.
valueThe item's new value.
Returns
true if successful.

◆ GetData()

virtual Bool Murl::IPreferencesControl::GetData ( const String key,
Data value 
) const
pure virtual

Get binary data from a preference item with a given key.

Parameters
keyThe item key to query.
valueThe 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()

virtual Bool Murl::IPreferencesControl::SetData ( const String key,
const Data value 
)
pure virtual

Set binary data to a preference item with a given key.

Parameters
keyThe item key to set.
valueThe item's new binary data.
Returns
true if successful.

◆ Remove()

virtual Bool Murl::IPreferencesControl::Remove ( const String key)
pure virtual

Remove an preference item for a given key.

Parameters
keyThe 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


Copyright © 2011-2024 Spraylight GmbH.