Electroneum
Loading...
Searching...
No Matches
keyvalue_serialization_overloads.h
Go to the documentation of this file.
1// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are met:
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above copyright
9// notice, this list of conditions and the following disclaimer in the
10// documentation and/or other materials provided with the distribution.
11// * Neither the name of the Andrey N. Sabelnikov nor the
12// names of its contributors may be used to endorse or promote products
13// derived from this software without specific prior written permission.
14//
15// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY
19// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25//
26
27#pragma once
28
29#include <set>
30#include <list>
31#include <vector>
32#include <deque>
33#include <boost/mpl/vector.hpp>
34#include <boost/mpl/contains_fwd.hpp>
35
36#undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
37#define ELECTRONEUM_DEFAULT_LOG_CATEGORY "serialization"
38
39namespace epee
40{
41 namespace
42 {
43 template<class C> void hint_resize(C &container, size_t size) {}
44 template<class C> void hint_resize(std::vector<C> &container, size_t size) { container.reserve(size); }
45 }
46 namespace serialization
47 {
48
49 //-------------------------------------------------------------------------------------------------------------------
50 template<class t_type, class t_storage>
51 static bool serialize_t_val(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
52 {
53 return stg.set_value(pname, d, hparent_section);
54 }
55 //-------------------------------------------------------------------------------------------------------------------
56 template<class t_type, class t_storage>
57 static bool unserialize_t_val(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
58 {
59 return stg.get_value(pname, d, hparent_section);
60 }
61 //-------------------------------------------------------------------------------------------------------------------
62 template<class t_type, class t_storage>
63 static bool serialize_t_val_as_blob(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
64 {
65 std::string blob((const char *)&d, sizeof(d));
66 return stg.set_value(pname, blob, hparent_section);
67 }
68 //-------------------------------------------------------------------------------------------------------------------
69 template<class t_type, class t_storage>
70 static bool unserialize_t_val_as_blob(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
71 {
72 std::string blob;
73 if(!stg.get_value(pname, blob, hparent_section))
74 return false;
75 CHECK_AND_ASSERT_MES(blob.size() == sizeof(d), false, "unserialize_t_val_as_blob: size of " << typeid(t_type).name() << " = " << sizeof(t_type) << ", but stored blod size = " << blob.size() << ", value name = " << pname);
76 d = *(const t_type*)blob.data();
77 return true;
78 }
79 //-------------------------------------------------------------------------------------------------------------------
80 template<class serializible_type, class t_storage>
81 static bool serialize_t_obj(const serializible_type& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
82 {
83 typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, true);
84 CHECK_AND_ASSERT_MES(hchild_section, false, "serialize_t_obj: failed to open/create section " << pname);
85 return obj.store(stg, hchild_section);
86 }
87 //-------------------------------------------------------------------------------------------------------------------
88 template<class serializible_type, class t_storage>
89 static bool unserialize_t_obj(serializible_type& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
90 {
91 typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, false);
92 if(!hchild_section) return false;
93 return obj._load(stg, hchild_section);
94 }
95 //-------------------------------------------------------------------------------------------------------------------
96 template<class serializible_type, class t_storage>
97 static bool serialize_t_obj(enableable<serializible_type>& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
98 {
99 if(!obj.enabled)
100 return true;
101 return serialize_t_obj(obj.v, stg, hparent_section, pname);
102 }
103 //-------------------------------------------------------------------------------------------------------------------
104 template<class serializible_type, class t_storage>
105 static bool unserialize_t_obj(enableable<serializible_type>& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
106 {
107 obj.enabled = false;
108 typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, false);
109 if(!hchild_section) return false;
110 obj.enabled = true;
111 return obj.v._load(stg, hchild_section);
112 }
113 //-------------------------------------------------------------------------------------------------------------------
114 template<class stl_container, class t_storage>
115 static bool serialize_stl_container_t_val (const stl_container& container, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
116 {
117 if(!container.size()) return true;
118 typename stl_container::const_iterator it = container.begin();
119 typename t_storage::harray hval_array = stg.insert_first_value(pname, *it, hparent_section);
120 CHECK_AND_ASSERT_MES(hval_array, false, "failed to insert first value to storage");
121 it++;
122 for(;it!= container.end();it++)
123 stg.insert_next_value(hval_array, *it);
124
125 return true;
126 }
127 //--------------------------------------------------------------------------------------------------------------------
128 template<class stl_container, class t_storage>
129 static bool unserialize_stl_container_t_val(stl_container& container, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
130 {
131 container.clear();
132 typename stl_container::value_type exchange_val;
133 typename t_storage::harray hval_array = stg.get_first_value(pname, exchange_val, hparent_section);
134 if(!hval_array) return false;
135 container.insert(container.end(), std::move(exchange_val));
136 while(stg.get_next_value(hval_array, exchange_val))
137 container.insert(container.end(), std::move(exchange_val));
138 return true;
139 }//--------------------------------------------------------------------------------------------------------------------
140 template<class stl_container, class t_storage>
141 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)
142 {
143 if(!container.size()) return true;
144 std::string mb;
145 mb.resize(sizeof(typename stl_container::value_type)*container.size());
146 typename stl_container::value_type* p_elem = (typename stl_container::value_type*)mb.data();
147 BOOST_FOREACH(const typename stl_container::value_type& v, container)
148 {
149 *p_elem = v;
150 p_elem++;
151 }
152 return stg.set_value(pname, mb, hparent_section);
153 }
154 //--------------------------------------------------------------------------------------------------------------------
155 template<class stl_container, class t_storage>
156 static bool unserialize_stl_container_pod_val_as_blob(stl_container& container, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
157 {
158 container.clear();
159 std::string buff;
160 bool res = stg.get_value(pname, buff, hparent_section);
161 if(res)
162 {
163 size_t loaded_size = buff.size();
164 typename stl_container::value_type* pelem = (typename stl_container::value_type*)buff.data();
165 CHECK_AND_ASSERT_MES(!(loaded_size%sizeof(typename stl_container::value_type)),
166 false,
167 "size in blob " << loaded_size << " not have not zero modulo for sizeof(value_type) = " << sizeof(typename stl_container::value_type) << ", type " << typeid(typename stl_container::value_type).name());
168 size_t count = (loaded_size/sizeof(typename stl_container::value_type));
169 hint_resize(container, count);
170 for(size_t i = 0; i < count; i++)
171 container.insert(container.end(), *(pelem++));
172 }
173 return res;
174 }
175 //--------------------------------------------------------------------------------------------------------------------
176 template<class stl_container, class t_storage>
177 static bool serialize_stl_container_t_obj (const stl_container& container, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
178 {
179 bool res = false;
180 if(!container.size()) return true;
181 typename stl_container::const_iterator it = container.begin();
182 typename t_storage::hsection hchild_section = nullptr;
183 typename t_storage::harray hsec_array = stg.insert_first_section(pname, hchild_section, hparent_section);
184 CHECK_AND_ASSERT_MES(hsec_array && hchild_section, false, "failed to insert first section with section name " << pname);
185 res = it->store(stg, hchild_section);
186 it++;
187 for(;it!= container.end();it++)
188 {
189 stg.insert_next_section(hsec_array, hchild_section);
190 res |= it->store(stg, hchild_section);
191 }
192 return res;
193 }
194 //--------------------------------------------------------------------------------------------------------------------
195 template<class stl_container, class t_storage>
196 static bool unserialize_stl_container_t_obj(stl_container& container, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
197 {
198 bool res = false;
199 container.clear();
200 typename stl_container::value_type val = typename stl_container::value_type();
201 typename t_storage::hsection hchild_section = nullptr;
202 typename t_storage::harray hsec_array = stg.get_first_section(pname, hchild_section, hparent_section);
203 if(!hsec_array || !hchild_section) return false;
204 res = val._load(stg, hchild_section);
205 container.insert(container.end(), val);
206 while(stg.get_next_section(hsec_array, hchild_section))
207 {
208 typename stl_container::value_type val_l = typename stl_container::value_type();
209 res |= val_l._load(stg, hchild_section);
210 container.insert(container.end(), std::move(val_l));
211 }
212 return res;
213 }
214 //--------------------------------------------------------------------------------------------------------------------
215 template<bool>
217
218 template<>
220 {
221 template<class t_type, class t_storage>
222 static bool kv_serialize(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
223 {
224 return stg.set_value(pname, d, hparent_section);
225 }
226 //-------------------------------------------------------------------------------------------------------------------
227 template<class t_type, class t_storage>
228 static bool kv_unserialize(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
229 {
230 return stg.get_value(pname, d, hparent_section);
231 }
232 //-------------------------------------------------------------------------------------------------------------------
233 template<class t_type, class t_storage>
234 static bool kv_serialize(const std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
235 {
236 return serialize_stl_container_t_val(d, stg, hparent_section, pname);
237 }
238 //-------------------------------------------------------------------------------------------------------------------
239 template<class t_type, class t_storage>
240 static bool kv_unserialize(std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
241 {
242 return unserialize_stl_container_t_val(d, stg, hparent_section, pname);
243 }
244 //-------------------------------------------------------------------------------------------------------------------
245 template<class t_type, class t_storage>
246 static bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
247 {
248 return serialize_stl_container_t_val(d, stg, hparent_section, pname);
249 }
250 //-------------------------------------------------------------------------------------------------------------------
251 template<class t_type, class t_storage>
252 static bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
253 {
254 return unserialize_stl_container_t_val(d, stg, hparent_section, pname);
255 }
256 //-------------------------------------------------------------------------------------------------------------------
257 template<class t_type, class t_storage>
258 static bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
259 {
260 return serialize_stl_container_t_val(d, stg, hparent_section, pname);
261 }
262 //-------------------------------------------------------------------------------------------------------------------
263 template<class t_type, class t_storage>
264 static bool kv_unserialize(std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
265 {
266 return unserialize_stl_container_t_val(d, stg, hparent_section, pname);
267 }
268 //-------------------------------------------------------------------------------------------------------------------
269 template<class t_type, class t_storage>
270 static bool kv_serialize(const std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
271 {
272 return serialize_stl_container_t_val(d, stg, hparent_section, pname);
273 }
274 //-------------------------------------------------------------------------------------------------------------------
275 template<class t_type, class t_storage>
276 static bool kv_unserialize(std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
277 {
278 return unserialize_stl_container_t_val(d, stg, hparent_section, pname);
279 }
280 //-------------------------------------------------------------------------------------------------------------------
281 };
282 template<>
284 {
285 template<class t_type, class t_storage>
286 static bool kv_serialize(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
287 {
288 return serialize_t_obj(d, stg, hparent_section, pname);
289 }
290 //-------------------------------------------------------------------------------------------------------------------
291 template<class t_type, class t_storage>
292 static bool kv_unserialize(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
293 {
294 return unserialize_t_obj(d, stg, hparent_section, pname);
295 }
296
297 //-------------------------------------------------------------------------------------------------------------------
298 template<class t_type, class t_storage>
299 static bool kv_serialize(const std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
300 {
301 return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
302 }
303 //-------------------------------------------------------------------------------------------------------------------
304 template<class t_type, class t_storage>
305 static bool kv_unserialize(std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
306 {
307 return unserialize_stl_container_t_obj(d, stg, hparent_section, pname);
308 }
309 //-------------------------------------------------------------------------------------------------------------------
310 template<class t_type, class t_storage>
311 static bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
312 {
313 return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
314 }
315 //-------------------------------------------------------------------------------------------------------------------
316 template<class t_type, class t_storage>
317 static bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
318 {
319 return unserialize_stl_container_t_obj(d, stg, hparent_section, pname);
320 }
321 //-------------------------------------------------------------------------------------------------------------------
322 template<class t_type, class t_storage>
323 static bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
324 {
325 return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
326 }
327 //-------------------------------------------------------------------------------------------------------------------
328 template<class t_type, class t_storage>
329 static bool kv_unserialize(std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
330 {
331 return unserialize_stl_container_t_obj(d, stg, hparent_section, pname);
332 }
333 //-------------------------------------------------------------------------------------------------------------------
334 template<class t_type, class t_storage>
335 static bool kv_serialize(const std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
336 {
337 return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
338 }
339 //-------------------------------------------------------------------------------------------------------------------
340 template<class t_type, class t_storage>
341 static bool kv_unserialize(std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
342 {
343 return unserialize_stl_container_t_obj(d, stg, hparent_section, pname);
344 }
345 };
346 template<class t_storage>
347 struct base_serializable_types: public boost::mpl::vector<uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, typename t_storage::meta_entry>::type
348 {};
349 //-------------------------------------------------------------------------------------------------------------------
350 template<bool> struct selector;
351 template<>
353 {
354 template<class t_type, class t_storage>
355 static bool serialize(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
356 {
357 return kv_serialize(d, stg, hparent_section, pname);
358 }
359
360 template<class t_type, class t_storage>
361 static bool serialize_stl_container_pod_val_as_blob(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
362 {
363 return epee::serialization::serialize_stl_container_pod_val_as_blob(d, stg, hparent_section, pname);
364 }
365
366 template<class t_type, class t_storage>
367 static bool serialize_t_val_as_blob(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
368 {
369 return epee::serialization::serialize_t_val_as_blob(d, stg, hparent_section, pname);
370 }
371
372
373 };
374 template<>
376 {
377 template<class t_type, class t_storage>
378 static bool serialize(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
379 {
380 return kv_unserialize(d, stg, hparent_section, pname);
381 }
382 template<class t_type, class t_storage>
383 static bool serialize_stl_container_pod_val_as_blob(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
384 {
385 return epee::serialization::unserialize_stl_container_pod_val_as_blob(d, stg, hparent_section, pname);
386 }
387
388 template<class t_type, class t_storage>
389 static bool serialize_t_val_as_blob(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
390 {
391 return epee::serialization::unserialize_t_val_as_blob(d, stg, hparent_section, pname);
392 }
393 };
394
395 template<class t_type, class t_storage>
396 bool kv_serialize(const t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
397 {
399 }
400 //-------------------------------------------------------------------------------------------------------------------
401 template<class t_type, class t_storage>
402 bool kv_unserialize(t_type& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
403 {
405 }
406 //-------------------------------------------------------------------------------------------------------------------
407 template<class t_type, class t_storage>
408 bool kv_serialize(const std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
409 {
411 }
412 //-------------------------------------------------------------------------------------------------------------------
413 template<class t_type, class t_storage>
414 bool kv_unserialize(std::vector<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
415 {
417 }
418 //-------------------------------------------------------------------------------------------------------------------
419 template<class t_type, class t_storage>
420 bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
421 {
423 }
424 //-------------------------------------------------------------------------------------------------------------------
425 template<class t_type, class t_storage>
426 bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
427 {
429 }
430 //-------------------------------------------------------------------------------------------------------------------
431 template<class t_type, class t_storage>
432 bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
433 {
435 }
436 //-------------------------------------------------------------------------------------------------------------------
437 template<class t_type, class t_storage>
438 bool kv_unserialize(std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
439 {
441 }
442 //-------------------------------------------------------------------------------------------------------------------
443 template<class t_type, class t_storage>
444 bool kv_serialize(const std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
445 {
447 }
448 //-------------------------------------------------------------------------------------------------------------------
449 template<class t_type, class t_storage>
450 bool kv_unserialize(std::set<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
451 {
453 }
454 }
455}
const char * res
#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)
bool kv_unserialize(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
bool kv_serialize(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
const GenericPointer< typename T::ValueType > T2 value
Definition pointer.h:1225
#define true
#define false
static bool kv_serialize(const std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::deque< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::set< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const std::list< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_serialize(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool kv_unserialize(std::vector< t_type > &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize_t_val_as_blob(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize_stl_container_pod_val_as_blob(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize(t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize_t_val_as_blob(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)
static bool serialize_stl_container_pod_val_as_blob(const t_type &d, t_storage &stg, typename t_storage::hsection hparent_section, const char *pname)