CAF  0.17.3
Public Types | Public Member Functions | List of all members
caf::binary_deserializer Class Reference

Deserializes objects from sequence of bytes. More...

#include <binary_deserializer.hpp>

Inheritance diagram for caf::binary_deserializer:
caf::write_inspector< binary_deserializer >

Public Types

using result_type = error_code< sec >
 

Public Member Functions

template<class Container >
 binary_deserializer (actor_system &sys, const Container &input) noexcept
 
template<class Container >
 binary_deserializer (execution_unit *ctx, const Container &input) noexcept
 
 binary_deserializer (execution_unit *ctx, const void *buf, size_t size) noexcept
 
 binary_deserializer (actor_system &sys, const void *buf, size_t size) noexcept
 
size_t remaining () const noexcept
 Returns how many bytes are still available to read.
 
span< const byteremainder () const noexcept
 Returns the remaining bytes.
 
execution_unitcontext () const noexcept
 Returns the current execution unit.
 
void skip (size_t num_bytes) noexcept
 Jumps num_bytes forward. More...
 
void reset (span< const byte > bytes) noexcept
 Assigns a new input.
 
const bytecurrent () const noexcept
 Returns the current read position.
 
const byteend () const noexcept
 Returns the end of the assigned memory block.
 
result_type begin_object (uint16_t &typenr, std::string &name)
 
result_type end_object () noexcept
 
result_type begin_sequence (size_t &list_size) noexcept
 
result_type end_sequence () noexcept
 
result_type apply (bool &) noexcept
 
result_type apply (byte &) noexcept
 
result_type apply (int8_t &) noexcept
 
result_type apply (uint8_t &) noexcept
 
result_type apply (int16_t &) noexcept
 
result_type apply (uint16_t &) noexcept
 
result_type apply (int32_t &) noexcept
 
result_type apply (uint32_t &) noexcept
 
result_type apply (int64_t &) noexcept
 
result_type apply (uint64_t &) noexcept
 
result_type apply (float &) noexcept
 
result_type apply (double &) noexcept
 
result_type apply (long double &)
 
result_type apply (span< byte >) noexcept
 
result_type apply (std::string &)
 
result_type apply (std::u16string &)
 
result_type apply (std::u32string &)
 
template<class Enum , class = std::enable_if_t<std::is_enum<Enum>::value>>
auto apply (Enum &x) noexcept
 
result_type apply (std::vector< bool > &xs)
 
- Public Member Functions inherited from caf::write_inspector< binary_deserializer >
auto operator() (Ts &&... xs)
 

Additional Inherited Members

- Static Public Attributes inherited from caf::write_inspector< binary_deserializer >
static constexpr bool reads_state
 
static constexpr bool writes_state
 

Detailed Description

Deserializes objects from sequence of bytes.

Member Function Documentation

◆ skip()

void caf::binary_deserializer::skip ( size_t  num_bytes)
noexcept

Jumps num_bytes forward.

Precondition
num_bytes <= remaining()

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