libcaf
0.13.2
|
Implements the serializer interface with a binary serialization protocol. More...
#include <binary_serializer.hpp>
Public Types | |
using | write_fun = std::function< void(const char *, const char *)> |
Public Member Functions | |
template<class OutIter > | |
binary_serializer (OutIter iter, actor_namespace *ns=nullptr) | |
Creates a binary serializer writing to given iterator position. | |
void | begin_object (const uniform_type_info *uti) override |
Begins serialization of an object of type uti . | |
void | end_object () override |
Ends serialization of an object. | |
void | begin_sequence (size_t list_size) override |
Begins serialization of a sequence of size num . | |
void | end_sequence () override |
Ends serialization of a sequence. | |
void | write_value (const primitive_variant &value) override |
Writes a single value to the data sink. More... | |
void | write_raw (size_t num_bytes, const void *data) override |
Writes a raw block of data. More... | |
![]() | |
serializer (const serializer &)=delete | |
serializer & | operator= (const serializer &)=delete |
serializer (actor_namespace *addressing=nullptr) | |
actor_namespace * | get_namespace () |
template<class T > | |
serializer & | write (const T &val) |
template<class T > | |
serializer & | write (const T &val, const uniform_type_info *uti) |
Additional Inherited Members | |
![]() | |
template<class T > | |
serializer & | operator<< (serializer &s, const T &what) |
Serializes a value to s . More... | |
Implements the serializer interface with a binary serialization protocol.
|
overridevirtual |
Writes a raw block of data.
num_bytes | The size of data in bytes. |
data | Raw data. |
Implements caf::serializer.
|
overridevirtual |
Writes a single value to the data sink.
value | A primitive data value. |
Implements caf::serializer.