ledger-core
Public Member Functions | List of all members
ledger::core::api::PreferencesEditor Class Referenceabstract

#include <PreferencesEditor.hpp>

+ Inheritance diagram for ledger::core::api::PreferencesEditor:

Public Member Functions

virtual std::shared_ptr< PreferencesEditorputString (const std::string &key, const std::string &value)=0
 
virtual std::shared_ptr< PreferencesEditorputInt (const std::string &key, int32_t value)=0
 
virtual std::shared_ptr< PreferencesEditorputLong (const std::string &key, int64_t value)=0
 
virtual std::shared_ptr< PreferencesEditorputBoolean (const std::string &key, bool value)=0
 
virtual std::shared_ptr< PreferencesEditorputStringArray (const std::string &key, const std::vector< std::string > &value)=0
 
virtual std::shared_ptr< PreferencesEditorputData (const std::string &key, const std::vector< uint8_t > &value)=0
 
virtual std::shared_ptr< PreferencesEditorremove (const std::string &key)=0
 
virtual void commit ()=0
 
virtual void clear ()=0
 

Detailed Description

Interface for editting Preferences. All changes to the editor are persisted to the disk only when comitted.

Member Function Documentation

◆ clear()

virtual void ledger::core::api::PreferencesEditor::clear ( )
pure virtual

Clear all preferences.

Implemented in ledger::core::PreferencesEditor.

◆ commit()

virtual void ledger::core::api::PreferencesEditor::commit ( )
pure virtual

Persists the changes to the Preferences.

Implemented in ledger::core::PreferencesEditor.

◆ putBoolean()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putBoolean ( const std::string &  key,
bool  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ putData()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putData ( const std::string &  key,
const std::vector< uint8_t > &  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ putInt()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putInt ( const std::string &  key,
int32_t  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ putLong()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putLong ( const std::string &  key,
int64_t  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ putString()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putString ( const std::string &  key,
const std::string &  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ putStringArray()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::putStringArray ( const std::string &  key,
const std::vector< std::string > &  value 
)
pure virtual

Sets the value to the given key in the Preferences.

Parameters
keyThe data key.
valueThe value to store
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.

◆ remove()

virtual std::shared_ptr<PreferencesEditor> ledger::core::api::PreferencesEditor::remove ( const std::string &  key)
pure virtual

Removes the data associated with the given key.

Parameters
keyThe key to remove from the Preferences
Returns
The reference of self in order to chain the call to the editor.

Implemented in ledger::core::PreferencesEditor.


The documentation for this class was generated from the following file: