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

#include <portable_storage_to_bin.h>

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

Public Member Functions

 storage_entry_store_visitor (t_stream &strm)
 
template<class pod_type >
bool pack_pod_type (uint8_t type, const pod_type &v)
 
bool operator() (const uint64_t &v)
 
bool operator() (const uint32_t &v)
 
bool operator() (const uint16_t &v)
 
bool operator() (const uint8_t &v)
 
bool operator() (const int64_t &v)
 
bool operator() (const int32_t &v)
 
bool operator() (const int16_t &v)
 
bool operator() (const int8_t &v)
 
bool operator() (const double &v)
 
bool operator() (const bool &v)
 
bool operator() (const std::string &v)
 
bool operator() (const section &v)
 
bool operator() (const array_entry &v)
 

Public Attributes

t_stream & m_strm
 

Detailed Description

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

Definition at line 142 of file portable_storage_to_bin.h.

Constructor & Destructor Documentation

◆ storage_entry_store_visitor()

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

Member Function Documentation

◆ operator()() [1/13]

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

Definition at line 154 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT64
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [2/13]

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

Definition at line 155 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT32
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [3/13]

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

Definition at line 156 of file portable_storage_to_bin.h.

#define SERIALIZE_TYPE_UINT16
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [4/13]

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

Definition at line 157 of file portable_storage_to_bin.h.

157 { return pack_pod_type(SERIALIZE_TYPE_UINT8, v);}
bool pack_pod_type(uint8_t type, const pod_type &v)
#define SERIALIZE_TYPE_UINT8
Here is the call graph for this function:

◆ operator()() [5/13]

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

Definition at line 158 of file portable_storage_to_bin.h.

158 { return pack_pod_type(SERIALIZE_TYPE_INT64, v);}
#define SERIALIZE_TYPE_INT64
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [6/13]

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

Definition at line 159 of file portable_storage_to_bin.h.

159 { return pack_pod_type(SERIALIZE_TYPE_INT32, v);}
#define SERIALIZE_TYPE_INT32
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [7/13]

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

Definition at line 160 of file portable_storage_to_bin.h.

160 { return pack_pod_type(SERIALIZE_TYPE_INT16, v);}
#define SERIALIZE_TYPE_INT16
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [8/13]

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

Definition at line 161 of file portable_storage_to_bin.h.

161 { return pack_pod_type(SERIALIZE_TYPE_INT8, v);}
bool pack_pod_type(uint8_t type, const pod_type &v)
#define SERIALIZE_TYPE_INT8
Here is the call graph for this function:

◆ operator()() [9/13]

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

Definition at line 162 of file portable_storage_to_bin.h.

bool pack_pod_type(uint8_t type, const pod_type &v)
#define SERIALIZE_TYPE_DUOBLE
Here is the call graph for this function:

◆ operator()() [10/13]

template<class t_stream>
bool epee::serialization::storage_entry_store_visitor< t_stream >::operator() ( const bool v)
inline

Definition at line 163 of file portable_storage_to_bin.h.

163 { return pack_pod_type(SERIALIZE_TYPE_BOOL, v);}
#define SERIALIZE_TYPE_BOOL
bool pack_pod_type(uint8_t type, const pod_type &v)
Here is the call graph for this function:

◆ operator()() [11/13]

template<class t_stream>
bool epee::serialization::storage_entry_store_visitor< t_stream >::operator() ( const std::string &  v)
inline

Definition at line 164 of file portable_storage_to_bin.h.

165  {
167  m_strm.write((const char*)&type, 1);
168  put_string(m_strm, v);
169  return true;
170  }
unsigned char uint8_t
Definition: stdint.h:124
#define SERIALIZE_TYPE_STRING
PRAGMA_WARNING_POP bool put_string(t_stream &strm, const std::string &v)
t_stream & m_strm
Here is the call graph for this function:

◆ operator()() [12/13]

template<class t_stream>
bool epee::serialization::storage_entry_store_visitor< t_stream >::operator() ( const section v)
inline

Definition at line 171 of file portable_storage_to_bin.h.

172  {
174  m_strm.write((const char*)&type, 1);
175  return pack_entry_to_buff(m_strm, v);
176  }
unsigned char uint8_t
Definition: stdint.h:124
#define SERIALIZE_TYPE_OBJECT
bool pack_entry_to_buff(t_stream &strm, const array_entry &ae)
t_stream & m_strm
Here is the call graph for this function:

◆ operator()() [13/13]

template<class t_stream>
bool epee::serialization::storage_entry_store_visitor< t_stream >::operator() ( const array_entry v)
inline

Definition at line 178 of file portable_storage_to_bin.h.

179  {
180  //uint8_t type = SERIALIZE_TYPE_ARRAY;
181  //m_strm.write((const char*)&type, 1);
182  return pack_entry_to_buff(m_strm, v);
183  }
bool pack_entry_to_buff(t_stream &strm, const array_entry &ae)
t_stream & m_strm
Here is the call graph for this function:

◆ pack_pod_type()

template<class t_stream>
template<class pod_type >
bool epee::serialization::storage_entry_store_visitor< t_stream >::pack_pod_type ( uint8_t  type,
const pod_type &  v 
)
inline

Definition at line 147 of file portable_storage_to_bin.h.

148  {
149  m_strm.write((const char*)&type, 1);
150  m_strm.write((const char*)&v, sizeof(pod_type));
151  return true;
152  }
t_stream & m_strm
Here is the caller graph for this function:

Member Data Documentation

◆ m_strm

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

Definition at line 144 of file portable_storage_to_bin.h.


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