|
pianod2
multisource multiuser scriptable networked music player
|
Store key-value pairs of arbitrary key and value types. More...
#include <datastore.h>


Public Member Functions | |
| Dictionary (const std::string &_origin, const std::string &_id) | |
| virtual const std::string & | origin (void) const override |
| Retrieve the origin (type of data) stored in this storage unit. More... | |
| virtual const std::string & | identity (void) const override |
| Retrieve the identity (primary identifier) of the data in this storage unit. More... | |
| void | rename (const std::string new_id) |
| bool | add (const TKey &key, const TValue &value) |
| const TValue & | get (const TKey &key, const TValue &def) const |
| Dictionary (const Parsnip::Data &data) | |
| virtual bool | reconstitute (const Parsnip::Data &data) override |
| Restore data from a JSON source. More... | |
| virtual Parsnip::Data | persist () const override |
| Persist data using Parsnip. More... | |
Public Member Functions inherited from UserData::DataStore | |
| virtual | ~DataStore (void) |
| bool | isSourceData (void) const |
Private Attributes | |
| const std::string | originid |
| const std::string | id |
Additional Inherited Members | |
Static Public Member Functions inherited from UserData::DataStore | |
| static bool | isSourceData (const std::string &origin) |
Store key-value pairs of arbitrary key and value types.
| TKey | The type of the key. Always string, at the moment. |
| TValue | The type of the data. |
| TStorage | The type of the data when serialized. |
|
inline |
|
inline |

|
inline |
|
inline |

|
inlineoverridevirtual |
Retrieve the identity (primary identifier) of the data in this storage unit.
Implements UserData::DataStore.

|
inlineoverridevirtual |
Retrieve the origin (type of data) stored in this storage unit.
Implements UserData::DataStore.

|
inlineoverridevirtual |
Persist data using Parsnip.
Implements UserData::DataStore.

|
inlineoverridevirtual |
Restore data from a JSON source.
| data | Data to restore from. |
Implements UserData::DataStore.


|
inline |
|
private |
|
private |