SST/macro
|
This class is basically a wrapper for objects to declare the order in which their members should be ser/des. More...
#include <serializer.h>
Public Types | |
enum | SERIALIZE_MODE { SIZER, PACK, UNPACK } |
Public Member Functions | |
serializer () | |
pvt::ser_packer & | packer () |
pvt::ser_unpacker & | unpacker () |
pvt::ser_sizer & | sizer () |
template<class T > | |
void | size (T &t) |
template<class T > | |
void | pack (T &t) |
template<class T > | |
void | unpack (T &t) |
virtual | ~serializer () |
SERIALIZE_MODE | mode () const |
void | set_mode (SERIALIZE_MODE mode) |
void | reset () |
template<typename T > | |
void | primitive (T &t) |
template<class T , int N> | |
void | array (T arr[N]) |
template<typename T , typename Int > | |
void | binary (T *&buffer, Int &size) |
template<typename Int > | |
void | binary (void *&buffer, Int &size) |
void | string (std::string &str) |
void | start_packing (char *buffer, size_t size) |
void | start_sizing () |
void | start_unpacking (char *buffer, size_t size) |
size_t | size () const |
Protected Attributes | |
pvt::ser_packer | packer_ |
pvt::ser_unpacker | unpacker_ |
pvt::ser_sizer | sizer_ |
SERIALIZE_MODE | mode_ |
This class is basically a wrapper for objects to declare the order in which their members should be ser/des.
Definition at line 33 of file serializer.h.
Enumerator | |
---|---|
SIZER | |
PACK | |
UNPACK |
Definition at line 36 of file serializer.h.
|
inline |
Definition at line 41 of file serializer.h.
|
inlinevirtual |
Definition at line 80 of file serializer.h.
|
inline |
Definition at line 119 of file serializer.h.
References sprockit::pvt::ser_sizer::add(), memcpy(), mode_, sprockit::pvt::ser_buffer_accessor::next_str(), PACK, packer_, SIZER, sizer_, UNPACK, and unpacker_.
Referenced by sprockit::serialize< T[N]>::operator()().
|
inline |
Definition at line 141 of file serializer.h.
References sprockit::pvt::ser_sizer::add(), mode_, PACK, pack(), sprockit::pvt::ser_packer::pack_buffer(), packer_, SIZER, sizer_, sprockit::pvt::ser_unpacker::unpack(), UNPACK, sprockit::pvt::ser_unpacker::unpack_buffer(), and unpacker_.
Referenced by sprockit::operator&().
|
inline |
Definition at line 169 of file serializer.h.
References sprockit::pvt::ser_sizer::add(), mode_, PACK, pack(), sprockit::pvt::ser_packer::pack_buffer(), packer_, SIZER, sizer_, string(), sprockit::pvt::ser_unpacker::unpack(), UNPACK, sprockit::pvt::ser_unpacker::unpack_buffer(), and unpacker_.
|
inline |
Definition at line 84 of file serializer.h.
References mode_.
Referenced by sprockit::serialize< std::vector< T > >::operator()(), sprockit::serialize< serializable * >::operator()(), sprockit::pvt::serialize_container(), sprockit::serialize_intrusive_ptr(), sprockit::pvt::serialize_map(), sprockit::pvt::serialize_set(), and set_mode().
|
inline |
Definition at line 69 of file serializer.h.
References sprockit::pvt::ser_packer::pack(), and packer_.
Referenced by binary(), sprockit::serialize< std::vector< T > >::operator()(), sprockit::pvt::serialize_container(), sprockit::pvt::serialize_map(), and sprockit::pvt::serialize_set().
|
inline |
Definition at line 47 of file serializer.h.
References packer_.
|
inline |
Definition at line 102 of file serializer.h.
References mode_, sprockit::pvt::ser_packer::pack(), PACK, packer_, sprockit::pvt::ser_sizer::size(), SIZER, sizer_, sprockit::pvt::ser_unpacker::unpack(), UNPACK, and unpacker_.
Referenced by sprockit::operator&(), sprockit::serialize< T >::operator()(), sprockit::serialize< bool >::operator()(), and sprockit::serialize_ptr< T, false >::operator()().
|
inline |
Definition at line 94 of file serializer.h.
References packer_, sprockit::pvt::ser_sizer::reset(), sprockit::pvt::ser_buffer_accessor::reset(), sizer_, and unpacker_.
|
inline |
|
inline |
Definition at line 63 of file serializer.h.
References sprockit::pvt::ser_sizer::size(), and sizer_.
Referenced by sprockit::serialize< std::vector< T > >::operator()(), sprockit::pvt::serialize_container(), sprockit::pvt::serialize_map(), and sprockit::pvt::serialize_set().
|
inline |
Definition at line 218 of file serializer.h.
References mode_, PACK, packer_, sprockit::pvt::ser_sizer::size(), sprockit::pvt::ser_buffer_accessor::size(), SIZER, sizer_, UNPACK, and unpacker_.
|
inline |
Definition at line 57 of file serializer.h.
References sizer_.
|
inline |
Definition at line 200 of file serializer.h.
References sprockit::pvt::ser_buffer_accessor::init(), mode_, PACK, and packer_.
|
inline |
Definition at line 206 of file serializer.h.
References mode_, sprockit::pvt::ser_sizer::reset(), SIZER, and sizer_.
|
inline |
Definition at line 212 of file serializer.h.
References sprockit::pvt::ser_buffer_accessor::init(), mode_, UNPACK, and unpacker_.
void sprockit::serializer::string | ( | std::string & | str | ) |
Referenced by binary(), and sprockit::serialize< std::string >::operator()().
|
inline |
Definition at line 75 of file serializer.h.
References sprockit::pvt::ser_unpacker::unpack(), and unpacker_.
Referenced by sprockit::serialize< std::vector< T > >::operator()(), sprockit::pvt::serialize_container(), sprockit::pvt::serialize_map(), and sprockit::pvt::serialize_set().
|
inline |
Definition at line 52 of file serializer.h.
References unpacker_.
|
protected |
Definition at line 232 of file serializer.h.
Referenced by array(), binary(), mode(), primitive(), set_mode(), size(), start_packing(), start_sizing(), and start_unpacking().
|
protected |
Definition at line 229 of file serializer.h.
Referenced by array(), binary(), pack(), packer(), primitive(), reset(), size(), and start_packing().
|
protected |
Definition at line 231 of file serializer.h.
Referenced by array(), binary(), primitive(), reset(), size(), sizer(), and start_sizing().
|
protected |
Definition at line 230 of file serializer.h.
Referenced by array(), binary(), primitive(), reset(), size(), start_unpacking(), unpack(), and unpacker().