libcaf  0.15.3
Public Types | Public Member Functions | Static Public Attributes | List of all members
caf::deserializer Class Reference

Technology-independent deserialization interface. More...

#include <deserializer.hpp>

Inheritance diagram for caf::deserializer:
caf::data_processor< deserializer > caf::stream_deserializer< Streambuf >

Public Types

using super = data_processor< deserializer >
 
using is_saving = std::false_type
 
using is_loading = std::true_type
 
- Public Types inherited from caf::data_processor< deserializer >
enum  builtin
 List of builtin types for data processors as enum.
 
using result_type = error
 Return type for operator().
 
using builtin_t = detail::type_list< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double, long double, std::string, std::u16string, std::u32string >
 List of builtin types for data processors.
 

Public Member Functions

 deserializer (actor_system &x)
 
 deserializer (execution_unit *x=nullptr)
 
- Public Member Functions inherited from caf::data_processor< deserializer >
 data_processor (const data_processor &)=delete
 
 data_processor (execution_unit *ctx=nullptr)
 
data_processoroperator= (const data_processor &)=delete
 
virtual error begin_object (uint16_t &typenr, std::string &name)=0
 Begins processing of an object. More...
 
virtual error end_object ()=0
 Ends processing of an object.
 
virtual error begin_sequence (size_t &num)=0
 Begins processing of a sequence. More...
 
virtual error end_sequence ()=0
 Ends processing of a sequence.
 
execution_unitcontext ()
 Returns the actor system associated to this data processor.
 
std::enable_if< std::is_floating_point< T >::value, error >::type apply (T &x)
 Applies this processor to an arithmetic type.
 
std::enable_if< std::is_integral< T >::value &&!std::is_same< bool, T >::value, error >::type apply (T &x)
 
error apply (std::string &x)
 
error apply (std::u16string &x)
 
error apply (std::u32string &x)
 
error apply (atom_constant< V > &x)
 
std::enable_if< std::is_enum< T >::value &&!detail::has_serialize< T >::value, error >::type apply (T &x)
 Serializes enums using the underlying type if no user-defined serialization is defined. More...
 
std::enable_if< std::is_empty< T >::value &&!detail::is_inspectable< deserializer, T >::value, error >::type apply (T &)
 Applies this processor to an empty type.
 
error apply (bool &x)
 
std::enable_if< detail::is_iterable< T >::value &&!detail::has_serialize< T >::value &&!detail::is_inspectable< deserializer, T >::value, error >::type apply (T &xs)
 Applies this processor to a sequence of values.
 
std::enable_if< detail::is_serializable< T >::value, error >::type apply (std::array< T, S > &xs)
 Applies this processor to an array.
 
std::enable_if< detail::is_serializable< T >::value, error >::type apply (T(&xs)[S])
 Applies this processor to an array.
 
std::enable_if< detail::is_serializable< typename std::remove_const< F >::type >::value &&detail::is_serializable< S >::value, error >::type apply (std::pair< F, S > &xs)
 
std::enable_if< detail::conjunction< detail::is_serializable< Ts >::value... >::value, error >::type apply (std::tuple< Ts... > &xs)
 
std::enable_if< !std::is_empty< T >::value &&detail::has_serialize< T >::value, error >::type apply (T &x)
 
std::enable_if< std::is_integral< Rep >::value, error >::type apply (std::chrono::duration< Rep, Period > &x)
 
std::enable_if< std::is_floating_point< Rep >::value, error >::type apply (std::chrono::duration< Rep, Period > &x)
 
error apply (std::chrono::time_point< std::chrono::system_clock, Duration > &t)
 
std::enable_if< detail::is_inspectable< deserializer, T >::value &&!detail::has_serialize< T >::value, decltype(inspect(std::declval< deserializer & >), std::declval< T & >))) >::type apply (T &x)
 
error consume_range (T &xs)
 
error consume_range_c (T &xs)
 Converts each element in xs to U before calling apply.
 
error fill_range (T &xs, size_t num_elements)
 
error fill_range_c (T &xs, size_t num_elements)
 Loads elements from type U before inserting to xs.
 
virtual error apply_raw (size_t num_bytes, void *data)=0
 Applies this processor to a raw block of data of size num_bytes.
 
error operator() ()
 
error operator() (meta::save_callback_t< F > x, Ts &&...xs)
 
error operator() (meta::load_callback_t< F > x, Ts &&...xs)
 
error operator() (const meta::annotation &, Ts &&...xs)
 
std::enable_if< is_allowed_unsafe_message_type< T >::value, error >::type operator() (const T &, Ts &&...xs)
 
std::enable_if< !meta::is_annotation< T >::value &&!is_allowed_unsafe_message_type< T >::value, error >::type operator() (T &&x, Ts &&...xs)
 

Static Public Attributes

static constexpr bool reads_state = false
 
static constexpr bool writes_state = true
 

Additional Inherited Members

- Static Public Member Functions inherited from caf::data_processor< deserializer >
static error apply_atom_constant (D &self, atom_constant< V > &)
 
static std::enable_if< D::reads_state &&!detail::is_byte_sequence< T >::value, error >::type apply_sequence (D &self, T &xs)
 
static std::enable_if< !D::reads_state &&!detail::is_byte_sequence< T >::value, error >::type apply_sequence (D &self, T &xs)
 
static std::enable_if< D::reads_state &&detail::is_byte_sequence< T >::value, error >::type apply_sequence (D &self, T &xs)
 
static std::enable_if< !D::reads_state &&detail::is_byte_sequence< T >::value, error >::type apply_sequence (D &self, T &xs)
 
- Protected Member Functions inherited from caf::data_processor< deserializer >
virtual error apply_builtin (builtin in_out_type, void *in_out)=0
 Applies this processor to a single builtin value.
 

Detailed Description

Technology-independent deserialization interface.


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