Handles serilialization of data-objects.
More...
Inherits scalable_object.
Handles serilialization of data-objects.
objects of this class are passed to serialization methods/functions. Try to use operator & only; using anything else is potentially dangerous.
Definition at line 348 of file serializer.h.
◆ complete()
void complete |
( |
const reserved & |
r, |
|
|
const T & |
_obj |
|
) |
| |
fill in data at position that has been reserved before rserve/complete supported for bitwise-serializable types only
◆ get_body()
- Returns
- pointer to the message body (without header)
◆ get_body_size()
size_type get_body_size |
( |
| ) |
const |
|
inline |
- Returns
- the number of bytes already packed into the buffer
◆ get_header()
void* get_header |
( |
| ) |
const |
|
inline |
- Returns
- pointer to message header
◆ get_header_size()
size_type get_header_size |
( |
| ) |
const |
|
inline |
◆ get_total_size()
size_type get_total_size |
( |
| ) |
const |
|
inline |
- Returns
- total number of bytes in buffer (header + data)
◆ operator &()
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).
◆ reserve()
reserved reserve |
( |
const T & |
_obj | ) |
|
reserve current position in buffer to be filled later with a call to "complete" rserve/complete supported for bitwise-serializable types only
◆ unpack_header()
size_type unpack_header |
( |
| ) |
const |
|
inline |
- Returns
- body size from header, -1 if something goes wrong
The documentation for this class was generated from the following file: