libcaf  0.14.4
Public Member Functions | List of all members
caf::binary_deserializer Class Reference

Implements the deserializer interface with a binary serialization protocol. More...

#include <binary_deserializer.hpp>

Inheritance diagram for caf::binary_deserializer:
caf::deserializer

Public Member Functions

 binary_deserializer (const void *buf, size_t buf_size, actor_namespace *ns=nullptr)
 
 binary_deserializer (const void *begin, const void *end_, actor_namespace *ns=nullptr)
 
 binary_deserializer (const binary_deserializer &other)
 
binary_deserializeroperator= (const binary_deserializer &other)
 
void set_rdbuf (const void *buf, size_t buf_size)
 Replaces the current read buffer.
 
void set_rdbuf (const void *begin, const void *end_)
 Replaces the current read buffer.
 
bool at_end () const
 Returns whether this deserializer has reached the end of its buffer.
 
bool buf_equals (const void *buf, size_t num_bytes)
 Compares the next num_bytes from the underlying buffer to buf with same semantics as strncmp(this->pos_, buf, num_bytes) == 0. More...
 
binary_deserializeradvance (ptrdiff_t num_bytes)
 Moves the current read position in the buffer by num_bytes.
 
const uniform_type_infobegin_object () override
 Begins deserialization of a new object.
 
void end_object () override
 Ends deserialization of an object.
 
size_t begin_sequence () override
 Begins deserialization of a sequence. More...
 
void end_sequence () override
 Ends deserialization of a sequence.
 
void read_value (primitive_variant &storage) override
 Reads a primitive value from the data source.
 
void read_raw (size_t num_bytes, void *storage) override
 Reads a raw memory block.
 
- Public Member Functions inherited from caf::deserializer
 deserializer (actor_namespace *ns=nullptr)
 
 deserializer (const deserializer &)=delete
 
deserializeroperator= (const deserializer &)=delete
 
template<class T >
T read ()
 Reads a value of type T from the data source. More...
 
template<class T >
T read (const uniform_type_info *uti)
 
template<class T >
deserializerread (T &storage)
 
template<class T >
deserializerread (T &storage, const uniform_type_info *uti)
 
actor_namespaceget_namespace ()
 
template<class Buffer >
void read_raw (size_t num_bytes, Buffer &storage)
 

Additional Inherited Members

- Protected Attributes inherited from caf::deserializer
actor_namespacenamespace_
 

Detailed Description

Implements the deserializer interface with a binary serialization protocol.

Examples:
announce_1.cpp.

Member Function Documentation

size_t caf::binary_deserializer::begin_sequence ( )
overridevirtual

Begins deserialization of a sequence.

Returns
The size of the sequence.

Implements caf::deserializer.

bool caf::binary_deserializer::buf_equals ( const void *  buf,
size_t  num_bytes 
)

Compares the next num_bytes from the underlying buffer to buf with same semantics as strncmp(this->pos_, buf, num_bytes) == 0.


The documentation for this class was generated from the following file: