Public Member Functions | |
| void | resize (size_type len) |
| (Re)allocates a buffer of the given size. | |
| size_type | get_header_size () const |
| size_type | get_body_size () const |
| size_type | get_total_size () const |
| void * | get_header () const |
| void * | get_body () const |
| size_type | unpack_header () const |
| template<class T> | |
| serializer & | operator & (T &var) |
| template<class T> | |
| size_type | packed_size (const T *arr, size_type len) const |
| Low-level packing interface:. | |
Friends | |
| void | swap (serializer &s1, serializer &s2) |
| Swap internal representations of the given two serializers. | |
objects of this class are passed to serialization methods/functions. Try to use operator & only; using anything else is potentially dangerous.
Definition at line 234 of file serializer.h.
| size_type get_header_size | ( | ) | const [inline] |
| size_type get_body_size | ( | ) | const [inline] |
| size_type get_total_size | ( | ) | const [inline] |
| void* get_header | ( | ) | const [inline] |
| void* get_body | ( | ) | const [inline] |
| size_type unpack_header | ( | ) | const [inline] |
| serializer& operator & | ( | T & | var | ) | [inline] |
Top-level packing interface, to be used in the "serialize" function of your classes. Applies the serializer to one object resp. an array of objects (e.g. packing them into the serializer or unpacking them from the serializer). Dispatches w.r.t. the packing category of the object's type (i.e. byte-wise copying or object serialization).
1.5.6