Electroneum
Loading...
Searching...
No Matches
serializer< Archive, T > Struct Template Reference

... wouldn't a class be better? More...

#include <serialization.h>

Static Public Member Functions

static bool serialize (Archive &ar, T &v)
template<typename A>
static bool serialize (Archive &ar, T &v, boost::false_type, boost::true_type, A a)
template<typename A>
static bool serialize (Archive &ar, T &v, boost::true_type, boost::false_type, A a)
static bool serialize (Archive &ar, T &v, boost::false_type, boost::false_type, boost::false_type)
static bool serialize (Archive &ar, T &v, boost::false_type, boost::false_type, boost::true_type)
static void serialize_custom (Archive &ar, T &v, boost::true_type)

Detailed Description

template<class Archive, class T>
struct serializer< Archive, T >

... wouldn't a class be better?

\detailed The logic behind serializing data. Places the archive data into the supplied parameter. This dispatches based on the supplied T template parameter's traits of is_blob_type or it is an integral (as defined by the is_integral trait). Depends on the Archive parameter to have overloaded the serialize_blob(T v, size_t size) and serialize_int(T v) base on which trait it applied. When the class has neither types, it falls to the overloaded method do_serialize(Archive ar) in T to do the work.

Definition at line 92 of file serialization.h.

Member Function Documentation

◆ serialize() [1/5]

template<class Archive, class T>
bool serializer< Archive, T >::serialize ( Archive & ar,
T & v )
inlinestatic

Definition at line 93 of file serialization.h.

93 {
94 return serialize(ar, v, typename boost::is_integral<T>::type(), typename is_blob_type<T>::type(), typename is_basic_type<T>::type());
95 }
... wouldn't a class be better?
static bool serialize(Archive &ar, T &v)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize() [2/5]

template<class Archive, class T>
bool serializer< Archive, T >::serialize ( Archive & ar,
T & v,
boost::false_type ,
boost::false_type ,
boost::false_type  )
inlinestatic

Definition at line 106 of file serialization.h.

106 {
107 //serialize_custom(ar, v, typename has_free_serializer<T>::type());
108 return v.do_serialize(ar);
109 }

◆ serialize() [3/5]

template<class Archive, class T>
bool serializer< Archive, T >::serialize ( Archive & ar,
T & v,
boost::false_type ,
boost::false_type ,
boost::true_type  )
inlinestatic

Definition at line 110 of file serialization.h.

110 {
111 //serialize_custom(ar, v, typename has_free_serializer<T>::type());
112 return do_serialize(ar, v);
113 }
bool do_serialize(Archive &ar, T &v)
just calls the serialize function defined for ar and v...
Here is the call graph for this function:

◆ serialize() [4/5]

template<class Archive, class T>
template<typename A>
bool serializer< Archive, T >::serialize ( Archive & ar,
T & v,
boost::false_type ,
boost::true_type ,
A a )
inlinestatic

Definition at line 97 of file serialization.h.

97 {
98 ar.serialize_blob(&v, sizeof(v));
99 return true;
100 }
Here is the call graph for this function:

◆ serialize() [5/5]

template<class Archive, class T>
template<typename A>
bool serializer< Archive, T >::serialize ( Archive & ar,
T & v,
boost::true_type ,
boost::false_type ,
A a )
inlinestatic

Definition at line 102 of file serialization.h.

102 {
103 ar.serialize_int(v);
104 return true;
105 }
Here is the call graph for this function:

◆ serialize_custom()

template<class Archive, class T>
void serializer< Archive, T >::serialize_custom ( Archive & ar,
T & v,
boost::true_type  )
inlinestatic

Definition at line 114 of file serialization.h.

114 {
115 }

The documentation for this struct was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/serialization/serialization.h