ledger-core
|
Public Member Functions | |
template<typename T > | |
optional< T > | get (const std::string &key) |
A generic indexed and type-safe getter. | |
template<typename T > | |
std::shared_ptr< DynamicObject > | put (const std::string &key, T value) |
A generic and type-safe put. | |
optional< std::string > | getString (const std::string &key) override |
optional< int32_t > | getInt (const std::string &key) override |
optional< int64_t > | getLong (const std::string &key) override |
optional< double > | getDouble (const std::string &key) override |
optional< bool > | getBoolean (const std::string &key) override |
optional< std::vector< uint8_t > > | getData (const std::string &key) override |
std::shared_ptr< api::DynamicObject > | getObject (const std::string &key) override |
std::shared_ptr< api::DynamicArray > | getArray (const std::string &key) override |
std::shared_ptr< api::DynamicObject > | putString (const std::string &key, const std::string &value) override |
std::shared_ptr< api::DynamicObject > | putInt (const std::string &key, int32_t value) override |
std::shared_ptr< api::DynamicObject > | putLong (const std::string &key, int64_t value) override |
std::shared_ptr< api::DynamicObject > | putDouble (const std::string &key, double value) override |
std::shared_ptr< api::DynamicObject > | putBoolean (const std::string &key, bool value) override |
std::shared_ptr< api::DynamicObject > | putData (const std::string &key, const std::vector< uint8_t > &value) override |
std::shared_ptr< api::DynamicObject > | putObject (const std::string &key, const std::shared_ptr< api::DynamicObject > &value) override |
std::shared_ptr< api::DynamicObject > | putArray (const std::string &key, const std::shared_ptr< api::DynamicArray > &value) override |
bool | contains (const std::string &key) override |
bool | remove (const std::string &key) override |
std::vector< std::string > | getKeys () override |
optional< api::DynamicType > | getType (const std::string &key) override |
std::string | dump () override |
std::vector< uint8_t > | serialize () override |
bool | isReadOnly () override |
void | setReadOnly (bool enable) |
std::shared_ptr< api::DynamicObject > | updateWithConfiguration (const std::shared_ptr< DynamicObject > &configuration) |
int64_t | size () override |
std::ostream & | dump (std::ostream &ss, int depth) const |
template<class Archive > | |
void | serialize (Archive &ar) |
![]() | |
virtual std::shared_ptr< DynamicObject > | putObject (const std::string &key, const std::shared_ptr< DynamicObject > &value)=0 |
virtual std::shared_ptr< DynamicObject > | putArray (const std::string &key, const std::shared_ptr< DynamicArray > &value)=0 |
Additional Inherited Members | |
![]() | |
static std::shared_ptr< DynamicObject > | newInstance () |
static std::shared_ptr< DynamicObject > | load (const std::vector< uint8_t > &serialized) |
|
overridevirtual |
Check if a key was used to store a value.
key,string,key | to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
|
overridevirtual |
Get, if exists, stored DynamicArray having a specific key.
key,string,key | of DynamicArray to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored bool having a specific key.
key,string,key | of bool to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored binary having a specific key.
key,string,key | of binary to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored double having a specific key.
key,string,key | of double to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored 32 bits integer having a specific key.
key,string,key | of 32 bits integer to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get list of keys.
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored 64 bits integer having a specific key.
key,string,key | of 64 bits integer to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored DynamicObject having a specific key.
key,string,key | of DynamicObject to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get, if exists, stored string having a specific key.
key,string,key | of string to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Get type of object stored with specific key.
key,string,key | to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
|
overridevirtual |
Store a boolean integer with a given key.
key,string,key | to access stored value |
value,bool |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Store a binary integer with a given key.
key,string,key | to access stored value |
value,binary |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Store a double with a given key.
key,string,key | to access stored value |
value,double |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Store a 32-bit integer with a given key.
key,string,key | to access stored value |
value,32-bit | integer |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Store a 64-bit integer with a given key.
key,string,key | to access stored value |
value,64-bit | integer |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Store a string with a given key.
key,string,key | to access stored value |
value,string |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
Delete key and value stored with it.
key,string,key | to look for |
Implements ledger::core::api::DynamicObject.
|
overridevirtual |
|
overridevirtual |