Monero
Loading...
Searching...
No Matches
epee::serialization::portable_storage Class Reference

#include <portable_storage.h>

Collaboration diagram for epee::serialization::portable_storage:

Classes

struct  limits_t
struct  storage_block_header

Public Types

typedef epee::serialization::hsection hsection
typedef epee::serialization::harray harray
typedef storage_entry meta_entry

Public Member Functions

 portable_storage ()
virtual ~portable_storage ()
hsection open_section (const std::string &section_name, hsection hparent_section, bool create_if_notexist=false)
template<class t_value>
bool get_value (const std::string &value_name, t_value &val, hsection hparent_section)
bool get_value (const std::string &value_name, storage_entry &val, hsection hparent_section)
template<class t_value>
bool set_value (const std::string &value_name, t_value &&target, hsection hparent_section)
template<class t_value>
harray get_first_value (const std::string &value_name, t_value &target, hsection hparent_section)
template<class t_value>
bool get_next_value (harray hval_array, t_value &target)
template<class t_value>
harray insert_first_value (const std::string &value_name, t_value &&target, hsection hparent_section)
template<class t_value>
bool insert_next_value (harray hval_array, t_value &&target)
harray get_first_section (const std::string &pSectionName, hsection &h_child_section, hsection hparent_section)
bool get_next_section (harray hSecArray, hsection &h_child_section)
harray insert_first_section (const std::string &pSectionName, hsection &hinserted_childsection, hsection hparent_section)
bool insert_next_section (harray hSecArray, hsection &hinserted_childsection)
bool delete_entry (const std::string &pentry_name, hsection hparent_section=nullptr)
bool store_to_binary (byte_slice &target, std::size_t initial_buffer_size=8192)
bool store_to_binary (byte_stream &ss)
bool load_from_binary (const epee::span< const uint8_t > target, const limits_t *limits=nullptr)
bool load_from_binary (const std::string &target, const limits_t *limits=nullptr)
template<class trace_policy>
bool dump_as_xml (std::string &targetObj, const std::string &root_name="")
bool dump_as_json (std::string &targetObj, size_t indent=0, bool insert_newlines=true)
bool load_from_json (const std::string &source)

Private Member Functions

hsection get_root_section ()
storage_entryfind_storage_entry (const std::string &pentry_name, hsection psection)
template<class entry_type>
storage_entryinsert_new_entry_get_storage_entry (const std::string &pentry_name, hsection psection, entry_type &&entry)
hsection insert_new_section (const std::string &pentry_name, hsection psection)

Private Attributes

section m_root

Member Typedef Documentation

◆ harray

◆ hsection

◆ meta_entry

Constructor & Destructor Documentation

◆ portable_storage()

epee::serialization::portable_storage::portable_storage ( )
inline

◆ ~portable_storage()

virtual epee::serialization::portable_storage::~portable_storage ( )
inlinevirtual

Member Function Documentation

◆ delete_entry()

bool epee::serialization::portable_storage::delete_entry ( const std::string & pentry_name,
hsection hparent_section = nullptr )

◆ dump_as_json()

bool epee::serialization::portable_storage::dump_as_json ( std::string & targetObj,
size_t indent = 0,
bool insert_newlines = true )

◆ dump_as_xml()

template<class trace_policy>
bool epee::serialization::portable_storage::dump_as_xml ( std::string & targetObj,
const std::string & root_name = "" )

◆ find_storage_entry()

storage_entry * epee::serialization::portable_storage::find_storage_entry ( const std::string & pentry_name,
hsection psection )
private

◆ get_first_section()

harray epee::serialization::portable_storage::get_first_section ( const std::string & pSectionName,
hsection & h_child_section,
hsection hparent_section )

◆ get_first_value()

template<class t_value>
harray epee::serialization::portable_storage::get_first_value ( const std::string & value_name,
t_value & target,
hsection hparent_section )

◆ get_next_section()

bool epee::serialization::portable_storage::get_next_section ( harray hSecArray,
hsection & h_child_section )

◆ get_next_value()

template<class t_value>
bool epee::serialization::portable_storage::get_next_value ( harray hval_array,
t_value & target )

◆ get_root_section()

hsection epee::serialization::portable_storage::get_root_section ( )
inlineprivate

◆ get_value() [1/2]

bool epee::serialization::portable_storage::get_value ( const std::string & value_name,
storage_entry & val,
hsection hparent_section )

◆ get_value() [2/2]

template<class t_value>
bool epee::serialization::portable_storage::get_value ( const std::string & value_name,
t_value & val,
hsection hparent_section )

◆ insert_first_section()

harray epee::serialization::portable_storage::insert_first_section ( const std::string & pSectionName,
hsection & hinserted_childsection,
hsection hparent_section )

◆ insert_first_value()

template<class t_value>
harray epee::serialization::portable_storage::insert_first_value ( const std::string & value_name,
t_value && target,
hsection hparent_section )

◆ insert_new_entry_get_storage_entry()

template<class entry_type>
storage_entry * epee::serialization::portable_storage::insert_new_entry_get_storage_entry ( const std::string & pentry_name,
hsection psection,
entry_type && entry )
private

◆ insert_new_section()

hsection epee::serialization::portable_storage::insert_new_section ( const std::string & pentry_name,
hsection psection )
private

◆ insert_next_section()

bool epee::serialization::portable_storage::insert_next_section ( harray hSecArray,
hsection & hinserted_childsection )

◆ insert_next_value()

template<class t_value>
bool epee::serialization::portable_storage::insert_next_value ( harray hval_array,
t_value && target )

◆ load_from_binary() [1/2]

bool epee::serialization::portable_storage::load_from_binary ( const epee::span< const uint8_t > target,
const limits_t * limits = nullptr )

◆ load_from_binary() [2/2]

bool epee::serialization::portable_storage::load_from_binary ( const std::string & target,
const limits_t * limits = nullptr )
inline

◆ load_from_json()

bool epee::serialization::portable_storage::load_from_json ( const std::string & source)

◆ open_section()

hsection epee::serialization::portable_storage::open_section ( const std::string & section_name,
hsection hparent_section,
bool create_if_notexist = false )

◆ set_value()

template<class t_value>
bool epee::serialization::portable_storage::set_value ( const std::string & value_name,
t_value && target,
hsection hparent_section )

◆ store_to_binary() [1/2]

bool epee::serialization::portable_storage::store_to_binary ( byte_slice & target,
std::size_t initial_buffer_size = 8192 )

◆ store_to_binary() [2/2]

bool epee::serialization::portable_storage::store_to_binary ( byte_stream & ss)

Member Data Documentation

◆ m_root

section epee::serialization::portable_storage::m_root
private

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