ledger-core
|
#include <DynamicObject.hpp>
Public Member Functions | |
virtual std::shared_ptr< DynamicObject > | putString (const std::string &key, const std::string &value)=0 |
virtual std::shared_ptr< DynamicObject > | putInt (const std::string &key, int32_t value)=0 |
virtual std::shared_ptr< DynamicObject > | putLong (const std::string &key, int64_t value)=0 |
virtual std::shared_ptr< DynamicObject > | putDouble (const std::string &key, double value)=0 |
virtual std::shared_ptr< DynamicObject > | putData (const std::string &key, const std::vector< uint8_t > &value)=0 |
virtual std::shared_ptr< DynamicObject > | putBoolean (const std::string &key, bool value)=0 |
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 |
virtual std::experimental::optional< std::string > | getString (const std::string &key)=0 |
virtual std::experimental::optional< int32_t > | getInt (const std::string &key)=0 |
virtual std::experimental::optional< int64_t > | getLong (const std::string &key)=0 |
virtual std::experimental::optional< double > | getDouble (const std::string &key)=0 |
virtual std::experimental::optional< std::vector< uint8_t > > | getData (const std::string &key)=0 |
virtual std::experimental::optional< bool > | getBoolean (const std::string &key)=0 |
virtual std::shared_ptr< DynamicObject > | getObject (const std::string &key)=0 |
virtual std::shared_ptr< DynamicArray > | getArray (const std::string &key)=0 |
virtual bool | contains (const std::string &key)=0 |
virtual bool | remove (const std::string &key)=0 |
virtual std::vector< std::string > | getKeys ()=0 |
virtual std::experimental::optional< DynamicType > | getType (const std::string &key)=0 |
virtual std::string | dump ()=0 |
virtual std::vector< uint8_t > | serialize ()=0 |
virtual bool | isReadOnly ()=0 |
virtual int64_t | size ()=0 |
Static Public Member Functions | |
static std::shared_ptr< DynamicObject > | newInstance () |
static std::shared_ptr< DynamicObject > | load (const std::vector< uint8_t > &serialized) |
Class representing an object that stores values of different types of objects, those values are appended dynamically in a map like structure with a given key through which they can be retreived.
|
pure virtual |
Check if a key was used to store a value.
key,string,key | to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
|
pure virtual |
Get, if exists, stored DynamicArray having a specific key.
key,string,key | of DynamicArray to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored bool having a specific key.
key,string,key | of bool to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored binary having a specific key.
key,string,key | of binary to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored double having a specific key.
key,string,key | of double to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored 32 bits integer having a specific key.
key,string,key | of 32 bits integer to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get list of keys.
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored 64 bits integer having a specific key.
key,string,key | of 64 bits integer to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored DynamicObject having a specific key.
key,string,key | of DynamicObject to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get, if exists, stored string having a specific key.
key,string,key | of string to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Get type of object stored with specific key.
key,string,key | to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
|
static |
Parse a binary to a DynamicObject.
serialized,binary | to parse |
|
static |
Create a new instance of DynamicObject class.
|
pure virtual |
Store a DynamicArray object with a given key.
key,string,key | to access stored reference |
|
pure virtual |
Store a boolean integer with a given key.
key,string,key | to access stored value |
value,bool |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Store a binary integer with a given key.
key,string,key | to access stored value |
value,binary |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Store a double with a given key.
key,string,key | to access stored value |
value,double |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Store a 32-bit integer with a given key.
key,string,key | to access stored value |
value,32-bit | integer |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Store a 64-bit integer with a given key.
key,string,key | to access stored value |
value,64-bit | integer |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Store another DynamicObject object with a given key.
key,string,key | to access stored value |
|
pure virtual |
Store a string with a given key.
key,string,key | to access stored value |
value,string |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
Delete key and value stored with it.
key,string,key | to look for |
Implemented in ledger::core::DynamicObject.
|
pure virtual |
|
pure virtual |