#include <portable_storage_from_bin.h>
Definition at line 44 of file portable_storage_from_bin.h.
◆ throwable_buffer_reader()
| epee::serialization::throwable_buffer_reader::throwable_buffer_reader |
( |
const void * | ptr, |
|
|
size_t | sz ) |
|
inline |
Definition at line 85 of file portable_storage_from_bin.h.
86 {
87 if(!ptr)
88 throw std::runtime_error("throwable_buffer_reader: ptr==nullptr");
89 if(!sz)
90 throw std::runtime_error("throwable_buffer_reader: sz==0");
92 m_count = sz;
93 m_recursion_count = 0;
94 }
◆ load_storage_array_entry()
| storage_entry epee::serialization::throwable_buffer_reader::load_storage_array_entry |
( |
uint8_t | type | ) |
|
|
inline |
Definition at line 148 of file portable_storage_from_bin.h.
149 {
151 type &= ~SERIALIZE_FLAG_ARRAY;
152 switch(type)
153 {
167 default:
169 }
170 }
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
#define SERIALIZE_TYPE_UINT32
#define SERIALIZE_TYPE_INT32
#define SERIALIZE_TYPE_DUOBLE
#define SERIALIZE_TYPE_UINT8
#define SERIALIZE_TYPE_UINT16
#define SERIALIZE_TYPE_INT64
#define SERIALIZE_TYPE_UINT64
#define SERIALIZE_TYPE_INT8
#define SERIALIZE_TYPE_STRING
#define SERIALIZE_TYPE_INT16
#define SERIALIZE_TYPE_OBJECT
#define SERIALIZE_TYPE_ARRAY
#define SERIALIZE_TYPE_BOOL
#define RECURSION_LIMITATION()
◆ load_storage_entry()
| storage_entry epee::serialization::throwable_buffer_reader::load_storage_entry |
( |
| ) |
|
|
inline |
Definition at line 231 of file portable_storage_from_bin.h.
232 {
238
239 switch(ent_type)
240 {
254 default:
256 }
257 }
storage_entry throwable_buffer_reader::read_se< std::string >()
#define SERIALIZE_FLAG_ARRAY
storage_entry load_storage_array_entry(uint8_t type)
◆ read() [1/6]
template<class t_type>
| t_type epee::serialization::throwable_buffer_reader::read |
( |
| ) |
|
◆ read() [2/6]
| void epee::serialization::throwable_buffer_reader::read |
( |
array_entry & | ae | ) |
|
|
inline |
◆ read() [3/6]
| void epee::serialization::throwable_buffer_reader::read |
( |
section & | sec | ) |
|
|
inline |
Definition at line 259 of file portable_storage_from_bin.h.
260 {
262 sec.m_entries.clear();
264 while(count--)
265 {
266
267 std::string sec_name;
270 }
271 }
mdb_size_t count(MDB_cursor *cur)
void read_sec_name(std::string &sce_name)
storage_entry load_storage_entry()
◆ read() [4/6]
| void epee::serialization::throwable_buffer_reader::read |
( |
std::string & | str | ) |
|
|
inline |
Definition at line 273 of file portable_storage_from_bin.h.
274 {
278 CHECK_AND_ASSERT_THROW_MES(m_count >= len,
"string len count value " << len <<
" goes out of remain storage len " << m_count);
279
280 str.assign((const char*)m_ptr, len);
281 m_ptr+=len;
282 m_count -= len;
283 }
#define MAX_STRING_LEN_POSSIBLE
◆ read() [5/6]
template<class t_pod_type>
| void epee::serialization::throwable_buffer_reader::read |
( |
t_pod_type & | pod_val | ) |
|
Definition at line 115 of file portable_storage_from_bin.h.
116 {
118 static_assert(std::is_pod<t_pod_type>::value, "POD type expected");
119 read(&pod_val,
sizeof(pod_val));
120 }
◆ read() [6/6]
| void epee::serialization::throwable_buffer_reader::read |
( |
void * | target, |
|
|
size_t | count ) |
|
inline |
◆ read_ae()
template<class type_name>
| storage_entry epee::serialization::throwable_buffer_reader::read_ae |
( |
| ) |
|
Definition at line 133 of file portable_storage_from_bin.h.
134 {
136
137 array_entry_t<type_name> sa;
140 sa.reserve(size);
141
142 while(size--)
145 }
boost::variant< uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, section, array_entry > storage_entry
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
void read(void *target, size_t count)
◆ read_se() [1/3]
template<>
| storage_entry epee::serialization::throwable_buffer_reader::read_se |
( |
| ) |
|
|
inline |
◆ read_se() [2/3]
template<>
| storage_entry epee::serialization::throwable_buffer_reader::read_se |
( |
| ) |
|
|
inline |
Definition at line 210 of file portable_storage_from_bin.h.
211 {
213 section s;
215 section& section_entry = boost::get<section>(se);
217 return se;
218 }
◆ read_se() [3/3]
template<class t_type>
| storage_entry epee::serialization::throwable_buffer_reader::read_se |
( |
| ) |
|
◆ read_sec_name()
| void epee::serialization::throwable_buffer_reader::read_sec_name |
( |
std::string & | sce_name | ) |
|
|
inline |
◆ read_varint()
| size_t epee::serialization::throwable_buffer_reader::read_varint |
( |
| ) |
|
|
inline |
Definition at line 173 of file portable_storage_from_bin.h.
174 {
177 size_t v = 0;
179 switch (size_mask)
180 {
185 default:
187 }
188 v >>= 2;
189 return v;
190 }
#define PORTABLE_RAW_SIZE_MARK_WORD
#define PORTABLE_RAW_SIZE_MARK_DWORD
#define PORTABLE_RAW_SIZE_MARK_MASK
#define PORTABLE_RAW_SIZE_MARK_BYTE
#define PORTABLE_RAW_SIZE_MARK_INT64
The documentation for this struct was generated from the following file: