Monero
Loading...
Searching...
No Matches
epee::serialization Namespace Reference

Namespaces

namespace  json

Classes

struct  kv_serialization_overloads_impl_is_base_serializable_types
struct  kv_serialization_overloads_impl_is_base_serializable_types< true >
struct  kv_serialization_overloads_impl_is_base_serializable_types< false >
struct  base_serializable_types
struct  selector
struct  selector< true >
struct  selector< false >
class  portable_storage
struct  get_value_visitor
struct  get_first_value_visitor
struct  get_next_value_visitor
struct  entry_container
struct  entry_container< bool >
struct  array_entry_t
struct  section
struct  ps_min_bytes
struct  ps_min_bytes< uint64_t >
struct  ps_min_bytes< int64_t >
struct  ps_min_bytes< uint32_t >
struct  ps_min_bytes< int32_t >
struct  ps_min_bytes< uint16_t >
struct  ps_min_bytes< int16_t >
struct  ps_min_bytes< uint8_t >
struct  ps_min_bytes< int8_t >
struct  ps_min_bytes< double >
struct  ps_min_bytes< bool >
struct  ps_min_bytes< std::string >
struct  ps_min_bytes< section >
struct  ps_min_bytes< array_entry >
struct  throwable_buffer_reader
struct  array_entry_store_visitor
struct  storage_entry_store_visitor
struct  array_entry_store_to_json_visitor
struct  storage_entry_store_to_json_visitor
struct  convert_to_signed_unsigned
struct  convert_to_signed_unsigned< from_type, to_type, true, true >
struct  convert_to_signed_unsigned< from_type, to_type, true, false >
struct  convert_to_signed_unsigned< from_type, to_type, false, true >
struct  convert_to_signed_unsigned< from_type, to_type, false, false >
struct  convert_to_integral
struct  convert_to_integral< from_type, to_type, true >
struct  convert_to_integral< from_type, to_type, false >
struct  convert_to_integral< std::string, uint64_t, false >
struct  is_convertable
struct  convert_to_same
struct  convert_to_same< from_type, to_type, true >
struct  convert_to_same< from_type, to_type, false >

Typedefs

typedef boost::make_recursive_variant< array_entry_t< section >, array_entry_t< uint64_t >, array_entry_t< uint32_t >, array_entry_t< uint16_t >, array_entry_t< uint8_t >, array_entry_t< int64_t >, array_entry_t< int32_t >, array_entry_t< int16_t >, array_entry_t< int8_t >, array_entry_t< double >, array_entry_t< bool >, array_entry_t< std::string >, array_entry_t< section >, array_entry_t< boost::recursive_variant_ > >::type array_entry
typedef boost::variant< uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, section, array_entrystorage_entry
typedef std::string binarybuffer
typedef sectionhsection
typedef array_entryharray

Functions

template<class t_type, class t_storage>
static bool serialize_t_val_as_blob (const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
static bool unserialize_t_val_as_blob (t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class serializible_type, class t_storage>
static bool serialize_t_obj (const serializible_type &obj, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class serializible_type, class t_storage>
static bool unserialize_t_obj (serializible_type &obj, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool serialize_stl_container_t_val (const stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool unserialize_stl_container_t_val (stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool serialize_stl_container_pod_val_as_blob (const stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool unserialize_stl_container_pod_val_as_blob (stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool serialize_stl_container_t_obj (const stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class stl_container, class t_storage>
static bool unserialize_stl_container_t_obj (stl_container &container, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_serialize (const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_unserialize (t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_serialize (const std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_unserialize (std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_serialize (const std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_unserialize (std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_serialize (const std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_unserialize (std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_serialize (const std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<class t_type, class t_storage>
bool kv_unserialize (std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
template<>
storage_entry throwable_buffer_reader::read_se< std::string > ()
template<class t_struct>
bool load_t_from_json (t_struct &out, const std::string &json_buff)
template<class t_struct>
bool load_t_from_json_file (t_struct &out, const std::string &json_file)
template<class t_struct>
bool store_t_to_json (t_struct &str_in, std::string &json_buff, size_t indent=0, bool insert_newlines=true)
template<class t_struct>
std::string store_t_to_json (t_struct &str_in, size_t indent=0, bool insert_newlines=true)
template<class t_struct>
bool store_t_to_json_file (t_struct &str_in, const std::string &fpath)
template<class t_struct>
bool load_t_from_binary (t_struct &out, const epee::span< const uint8_t > binary_buff, const epee::serialization::portable_storage::limits_t *limits=NULL)
template<class t_struct>
bool load_t_from_binary (t_struct &out, const std::string &binary_buff)
template<class t_struct>
bool load_t_from_binary_file (t_struct &out, const std::string &binary_file)
template<class t_struct>
bool store_t_to_binary (t_struct &str_in, byte_slice &binary_buff, size_t initial_buffer_size=8192)
template<class t_struct>
byte_slice store_t_to_binary (t_struct &str_in, size_t initial_buffer_size=8192)
template<class t_struct>
bool store_t_to_binary (t_struct &str_in, byte_stream &binary_buff)
template<class pack_value, class t_stream>
size_t pack_varint_t (t_stream &strm, uint8_t type_or, size_t &pv)
template<class t_stream>
size_t pack_varint (t_stream &strm, size_t val)
template<class t_stream>
bool put_string (t_stream &strm, const std::string &v)
template<class t_stream>
bool pack_entry_to_buff (t_stream &strm, const array_entry &ae)
template<class t_stream>
bool pack_entry_to_buff (t_stream &strm, const storage_entry &se)
template<class t_stream>
bool pack_entry_to_buff (t_stream &strm, const section &sec)
template<class t_stream>
void dump_as_json (t_stream &strm, const array_entry &ae, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const storage_entry &se, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const std::string &v, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const int8_t &v, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const uint8_t &v, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const bool &v, size_t indent, bool insert_newlines)
template<class t_stream, class t_type>
void dump_as_json (t_stream &strm, const t_type &v, size_t indent, bool insert_newlines)
template<class t_stream>
void dump_as_json (t_stream &strm, const section &sec, size_t indent, bool insert_newlines)
std::string make_indent (size_t indent)
template<typename from_type, typename to_type>
void convert_int_to_uint (const from_type &from, to_type &to)
template<typename from_type, typename to_type>
void convert_int_to_int (const from_type &from, to_type &to)
template<typename from_type, typename to_type>
void convert_uint_to_any_int (const from_type &from, to_type &to)
template<class from_type, class to_type>
void convert_t (const from_type &from, to_type &to)

Typedef Documentation

◆ array_entry

◆ binarybuffer

typedef std::string epee::serialization::binarybuffer

◆ harray

◆ hsection

◆ storage_entry

Function Documentation

◆ convert_int_to_int()

template<typename from_type, typename to_type>
void epee::serialization::convert_int_to_int ( const from_type & from,
to_type & to )

◆ convert_int_to_uint()

template<typename from_type, typename to_type>
void epee::serialization::convert_int_to_uint ( const from_type & from,
to_type & to )

◆ convert_t()

template<class from_type, class to_type>
void epee::serialization::convert_t ( const from_type & from,
to_type & to )

◆ convert_uint_to_any_int()

template<typename from_type, typename to_type>
void epee::serialization::convert_uint_to_any_int ( const from_type & from,
to_type & to )

◆ dump_as_json() [1/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const array_entry & ae,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [2/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const bool & v,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [3/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const int8_t & v,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [4/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const section & sec,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [5/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const std::string & v,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [6/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const storage_entry & se,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [7/8]

template<class t_stream, class t_type>
void epee::serialization::dump_as_json ( t_stream & strm,
const t_type & v,
size_t indent,
bool insert_newlines )

◆ dump_as_json() [8/8]

template<class t_stream>
void epee::serialization::dump_as_json ( t_stream & strm,
const uint8_t & v,
size_t indent,
bool insert_newlines )

◆ kv_serialize() [1/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_serialize ( const std::deque< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_serialize() [2/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_serialize ( const std::list< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_serialize() [3/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_serialize ( const std::set< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_serialize() [4/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_serialize ( const std::vector< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_serialize() [5/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_serialize ( const t_type & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_unserialize() [1/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_unserialize ( std::deque< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_unserialize() [2/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_unserialize ( std::list< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_unserialize() [3/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_unserialize ( std::set< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_unserialize() [4/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_unserialize ( std::vector< t_type > & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ kv_unserialize() [5/5]

template<class t_type, class t_storage>
bool epee::serialization::kv_unserialize ( t_type & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )

◆ load_t_from_binary() [1/2]

template<class t_struct>
bool epee::serialization::load_t_from_binary ( t_struct & out,
const epee::span< const uint8_t > binary_buff,
const epee::serialization::portable_storage::limits_t * limits = NULL )

◆ load_t_from_binary() [2/2]

template<class t_struct>
bool epee::serialization::load_t_from_binary ( t_struct & out,
const std::string & binary_buff )

◆ load_t_from_binary_file()

template<class t_struct>
bool epee::serialization::load_t_from_binary_file ( t_struct & out,
const std::string & binary_file )

◆ load_t_from_json()

template<class t_struct>
bool epee::serialization::load_t_from_json ( t_struct & out,
const std::string & json_buff )

◆ load_t_from_json_file()

template<class t_struct>
bool epee::serialization::load_t_from_json_file ( t_struct & out,
const std::string & json_file )

◆ make_indent()

std::string epee::serialization::make_indent ( size_t indent)
inline

◆ pack_entry_to_buff() [1/3]

template<class t_stream>
bool epee::serialization::pack_entry_to_buff ( t_stream & strm,
const array_entry & ae )

◆ pack_entry_to_buff() [2/3]

template<class t_stream>
bool epee::serialization::pack_entry_to_buff ( t_stream & strm,
const section & sec )

◆ pack_entry_to_buff() [3/3]

template<class t_stream>
bool epee::serialization::pack_entry_to_buff ( t_stream & strm,
const storage_entry & se )

◆ pack_varint()

template<class t_stream>
size_t epee::serialization::pack_varint ( t_stream & strm,
size_t val )

◆ pack_varint_t()

template<class pack_value, class t_stream>
size_t epee::serialization::pack_varint_t ( t_stream & strm,
uint8_t type_or,
size_t & pv )

◆ put_string()

template<class t_stream>
bool epee::serialization::put_string ( t_stream & strm,
const std::string & v )

◆ serialize_stl_container_pod_val_as_blob()

template<class stl_container, class t_storage>
bool epee::serialization::serialize_stl_container_pod_val_as_blob ( const stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ serialize_stl_container_t_obj()

template<class stl_container, class t_storage>
bool epee::serialization::serialize_stl_container_t_obj ( const stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ serialize_stl_container_t_val()

template<class stl_container, class t_storage>
bool epee::serialization::serialize_stl_container_t_val ( const stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ serialize_t_obj()

template<class serializible_type, class t_storage>
bool epee::serialization::serialize_t_obj ( const serializible_type & obj,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ serialize_t_val_as_blob()

template<class t_type, class t_storage>
bool epee::serialization::serialize_t_val_as_blob ( const t_type & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ store_t_to_binary() [1/3]

template<class t_struct>
bool epee::serialization::store_t_to_binary ( t_struct & str_in,
byte_slice & binary_buff,
size_t initial_buffer_size = 8192 )

◆ store_t_to_binary() [2/3]

template<class t_struct>
bool epee::serialization::store_t_to_binary ( t_struct & str_in,
byte_stream & binary_buff )

◆ store_t_to_binary() [3/3]

template<class t_struct>
byte_slice epee::serialization::store_t_to_binary ( t_struct & str_in,
size_t initial_buffer_size = 8192 )

◆ store_t_to_json() [1/2]

template<class t_struct>
std::string epee::serialization::store_t_to_json ( t_struct & str_in,
size_t indent = 0,
bool insert_newlines = true )

◆ store_t_to_json() [2/2]

template<class t_struct>
bool epee::serialization::store_t_to_json ( t_struct & str_in,
std::string & json_buff,
size_t indent = 0,
bool insert_newlines = true )

◆ store_t_to_json_file()

template<class t_struct>
bool epee::serialization::store_t_to_json_file ( t_struct & str_in,
const std::string & fpath )

◆ throwable_buffer_reader::read_se< std::string >()

◆ unserialize_stl_container_pod_val_as_blob()

template<class stl_container, class t_storage>
bool epee::serialization::unserialize_stl_container_pod_val_as_blob ( stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ unserialize_stl_container_t_obj()

template<class stl_container, class t_storage>
bool epee::serialization::unserialize_stl_container_t_obj ( stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ unserialize_stl_container_t_val()

template<class stl_container, class t_storage>
bool epee::serialization::unserialize_stl_container_t_val ( stl_container & container,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ unserialize_t_obj()

template<class serializible_type, class t_storage>
bool epee::serialization::unserialize_t_obj ( serializible_type & obj,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static

◆ unserialize_t_val_as_blob()

template<class t_type, class t_storage>
bool epee::serialization::unserialize_t_val_as_blob ( t_type & d,
t_storage & stg,
typename t_storage::hsection hparent_section,
const char * pname )
static