Electroneum
epee::serialization::array_entry_store_visitor< t_stream > Struct Template Reference

#include <portable_storage_to_bin.h>

Inheritance diagram for epee::serialization::array_entry_store_visitor< t_stream >:
Collaboration diagram for epee::serialization::array_entry_store_visitor< t_stream >:

Public Member Functions

template<class t_pod_type >
bool pack_pod_array_type (uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
 
 array_entry_store_visitor (t_stream &strm)
 
bool operator() (const array_entry_t< uint64_t > &v)
 
bool operator() (const array_entry_t< uint32_t > &v)
 
bool operator() (const array_entry_t< uint16_t > &v)
 
bool operator() (const array_entry_t< uint8_t > &v)
 
bool operator() (const array_entry_t< int64_t > &v)
 
bool operator() (const array_entry_t< int32_t > &v)
 
bool operator() (const array_entry_t< int16_t > &v)
 
bool operator() (const array_entry_t< int8_t > &v)
 
bool operator() (const array_entry_t< double > &v)
 
bool operator() (const array_entry_t< bool > &v)
 
bool operator() (const array_entry_t< std::string > &arr_str)
 
bool operator() (const array_entry_t< section > &arr_sec)
 
bool operator() (const array_entry_t< array_entry > &arra_ar)
 

Public Attributes

t_stream & m_strm
 

Detailed Description

template<class t_stream>
struct epee::serialization::array_entry_store_visitor< t_stream >

Definition at line 86 of file portable_storage_to_bin.h.

Constructor & Destructor Documentation

◆ array_entry_store_visitor()

template<class t_stream>
epee::serialization::array_entry_store_visitor< t_stream >::array_entry_store_visitor ( t_stream &  strm)
inline

Member Function Documentation

◆ operator()() [1/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< uint64_t > &  v)
inline

Definition at line 102 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT64
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [2/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< uint32_t > &  v)
inline

Definition at line 103 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT32
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [3/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< uint16_t > &  v)
inline

Definition at line 104 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT16
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [4/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< uint8_t > &  v)
inline

Definition at line 105 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT8
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [5/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< int64_t > &  v)
inline

Definition at line 106 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_INT64
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [6/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< int32_t > &  v)
inline

Definition at line 107 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_INT32
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [7/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< int16_t > &  v)
inline

Definition at line 108 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_INT16
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [8/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< int8_t > &  v)
inline

Definition at line 109 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_INT8
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [9/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< double > &  v)
inline

Definition at line 110 of file portable_storage_to_bin.h.

bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
#define SERIALIZE_TYPE_DUOBLE
Here is the call graph for this function:

◆ operator()() [10/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< bool > &  v)
inline

Definition at line 111 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_BOOL
bool pack_pod_array_type(uint8_t contained_type, const array_entry_t< t_pod_type > &arr_pod)
Here is the call graph for this function:

◆ operator()() [11/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< std::string > &  arr_str)
inline

Definition at line 112 of file portable_storage_to_bin.h.

113  {
115  m_strm.write((const char*)&type, 1);
116  pack_varint(m_strm, arr_str.m_array.size());
117  for(const std::string& s: arr_str.m_array)
118  put_string(m_strm, s);
119  return true;
120  }
PRAGMA_WARNING_PUSH size_t pack_varint(t_stream &strm, size_t val)
::std::string string
Definition: gtest-port.h:1097
unsigned char uint8_t
Definition: stdint.h:124
#define SERIALIZE_TYPE_STRING
t_stream & m_strm
#define SERIALIZE_FLAG_ARRAY
PRAGMA_WARNING_POP bool put_string(t_stream &strm, const std::string &v)
Here is the call graph for this function:

◆ operator()() [12/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< section > &  arr_sec)
inline

Definition at line 121 of file portable_storage_to_bin.h.

122  {
124  m_strm.write((const char*)&type, 1);
125  pack_varint(m_strm, arr_sec.m_array.size());
126  for(const section& s: arr_sec.m_array)
128  return true;
129  }
PRAGMA_WARNING_PUSH size_t pack_varint(t_stream &strm, size_t val)
unsigned char uint8_t
Definition: stdint.h:124
#define SERIALIZE_TYPE_OBJECT
t_stream & m_strm
#define SERIALIZE_FLAG_ARRAY
bool pack_entry_to_buff(t_stream &strm, const array_entry &ae)
Here is the call graph for this function:

◆ operator()() [13/13]

template<class t_stream>
bool epee::serialization::array_entry_store_visitor< t_stream >::operator() ( const array_entry_t< array_entry > &  arra_ar)
inline

Definition at line 130 of file portable_storage_to_bin.h.

131  {
133  m_strm.write((const char*)&type, 1);
134  pack_varint(m_strm, arra_ar.m_array.size());
135  for(const array_entry& s: arra_ar.m_array)
137  return true;
138  }
PRAGMA_WARNING_PUSH size_t pack_varint(t_stream &strm, size_t val)
unsigned char uint8_t
Definition: stdint.h:124
t_stream & m_strm
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
#define SERIALIZE_FLAG_ARRAY
bool pack_entry_to_buff(t_stream &strm, const array_entry &ae)
#define SERIALIZE_TYPE_ARRAY
Here is the call graph for this function:

◆ pack_pod_array_type()

template<class t_stream>
template<class t_pod_type >
bool epee::serialization::array_entry_store_visitor< t_stream >::pack_pod_array_type ( uint8_t  contained_type,
const array_entry_t< t_pod_type > &  arr_pod 
)
inline

Definition at line 91 of file portable_storage_to_bin.h.

92  {
93  uint8_t type = contained_type|SERIALIZE_FLAG_ARRAY;
94  m_strm.write((const char*)&type, 1);
95  pack_varint(m_strm, arr_pod.m_array.size());
96  for(const t_pod_type& x: arr_pod.m_array)
97  m_strm.write((const char*)&x, sizeof(t_pod_type));
98  return true;
99  }
PRAGMA_WARNING_PUSH size_t pack_varint(t_stream &strm, size_t val)
unsigned char uint8_t
Definition: stdint.h:124
t_stream & m_strm
#define SERIALIZE_FLAG_ARRAY
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_strm

template<class t_stream>
t_stream& epee::serialization::array_entry_store_visitor< t_stream >::m_strm

Definition at line 88 of file portable_storage_to_bin.h.


The documentation for this struct was generated from the following file: