C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
caf::binary_deserializer Class Reference

Deserializes C++ objects from sequence of bytes. More...

#include <binary_deserializer.hpp>

Inherits caf::load_inspector_base< Subtype >.

Public Types

using super = load_inspector_base< binary_deserializer >
 

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 std::byte > remainder () const noexcept
 Returns the remaining bytes.
 
execution_unitcontext () const noexcept
 Returns the current execution unit.
 
void skip (size_t num_bytes)
 Jumps num_bytes forward.
 
void reset (span< const std::byte > bytes) noexcept
 Assigns a new input.
 
const std::byte * current () const noexcept
 Returns the current read position.
 
const std::byte * end () const noexcept
 Returns the end of the assigned memory block.
 
bool fetch_next_object_type (type_id_t &type) noexcept
 
constexpr bool begin_object (type_id_t, std::string_view) noexcept
 
constexpr bool end_object () noexcept
 
constexpr bool begin_field (std::string_view) noexcept
 
bool begin_field (std::string_view name, bool &is_present) noexcept
 
bool begin_field (std::string_view name, span< const type_id_t > types, size_t &index) noexcept
 
bool begin_field (std::string_view name, bool &is_present, span< const type_id_t > types, size_t &index) noexcept
 
constexpr bool end_field ()
 
constexpr bool begin_tuple (size_t) noexcept
 
constexpr bool end_tuple () noexcept
 
constexpr bool begin_key_value_pair () noexcept
 
constexpr bool end_key_value_pair () noexcept
 
bool begin_sequence (size_t &list_size) noexcept
 
constexpr bool end_sequence () noexcept
 
bool begin_associative_array (size_t &size) noexcept
 
bool end_associative_array () noexcept
 
bool value (bool &x) noexcept
 
bool value (std::byte &x) noexcept
 
bool value (uint8_t &x) noexcept
 
bool value (int8_t &x) noexcept
 
bool value (int16_t &x) noexcept
 
bool value (uint16_t &x) noexcept
 
bool value (int32_t &x) noexcept
 
bool value (uint32_t &x) noexcept
 
bool value (int64_t &x) noexcept
 
bool value (uint64_t &x) noexcept
 
template<class T >
std::enable_if_t< std::is_integral_v< T >, bool > value (T &x) noexcept
 
bool value (float &x) noexcept
 
bool value (double &x) noexcept
 
bool value (long double &x)
 
bool value (std::string &x)
 
bool value (std::u16string &x)
 
bool value (std::u32string &x)
 
bool value (span< std::byte > x) noexcept
 
bool value (std::vector< bool > &x)
 

Static Public Member Functions

static constexpr bool has_human_readable_format () noexcept
 

Detailed Description

Deserializes C++ objects from sequence of bytes.

Does not perform run-time type checks.

Member Function Documentation

◆ skip()

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

Jumps num_bytes forward.

Precondition
num_bytes <= remaining()

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