framework
|
Serializable namespace. More...
Classes | |
struct | container_type |
struct | alias |
Serializable alias wrapper. More... | |
struct | bit_field |
Bit field container. More... | |
class | output_flags_frame |
Flags frame. More... | |
struct | optional_field |
Optional field container. More... | |
struct | default_optional_value |
Optional value implementation. More... | |
struct | optional_value |
Optional value container. More... | |
struct | value_implementation_wrapper |
Implementation wrapper. More... | |
struct | default_value |
Default implementation. More... | |
struct | value |
Value container. More... | |
class | inline_object |
Inline object wrapper. More... | |
struct | mutator_type |
struct | bit_value |
struct | little_endian |
struct | big_endian |
struct | pdp_endian |
struct | fixed_container |
struct | terminated_container |
struct | tuple_container |
struct | variable_container |
class | serializable_implementation |
Serializable implementation. More... | |
class | bit_stream |
Bit stream. More... | |
class | crc_wrapper |
CRC Wrapper. More... | |
class | modular_sum |
Modular sum writer. More... | |
struct | comparable |
Comparable template. More... | |
struct | value_type |
Typedefs | |
template<typename T > | |
using | is_container_type = typename detail::is_container_type_impl< T >::type |
template<typename T > | |
using | is_container_default_serializable = typename detail::is_container_default_serializable_impl< T >::type |
template<typename T > | |
using | container_specification = typename detail::container_specification_impl< T >::type |
template<typename T > | |
using | container_children = typename detail::container_children_impl< T >::type |
template<typename T > | |
using | is_mutator_type = typename detail::is_mutator_type_impl< T >::type |
template<typename T > | |
using | mutator_child = typename detail::mutator_child_impl< T >::type |
template<typename T > | |
using | type_extractor = typename detail::type_extractor_impl< T >::type |
Mutator type extractor. More... | |
template<std::size_t Size, typename Value > | |
using | stl_array = fixed_container< Value, std::array< type_extractor< Value >, Size >> |
Common STL array specification. | |
template<typename Size , typename Value > | |
using | stl_deque = variable_container< Size, Value, std::deque< type_extractor< Value >>> |
Common STL deque specification. | |
template<typename Size , typename Value > | |
using | stl_forward_list = variable_container< Size, Value, std::forward_list< type_extractor< Value >>> |
Common STL forward list specification. | |
template<typename Size , typename Value > | |
using | stl_list = variable_container< Size, Value, std::list< type_extractor< Value >>> |
Common STL list specification. | |
template<typename Size , typename T1 , typename T2 > | |
using | stl_map = variable_container< Size, stl_pair< T1, T2 >, std::map< type_extractor< T1 >, type_extractor< T2 >>> |
Common STL map specification. | |
template<typename Size , typename T1 , typename T2 > | |
using | stl_multimap = variable_container< Size, stl_pair< T1, T2 >, std::multimap< type_extractor< T1 >, type_extractor< T2 >>> |
Common STL multimap specification. | |
template<typename T1 , typename T2 > | |
using | stl_pair = tuple_container< pack_container< T1, T2 >, std::pair< type_extractor< T1 >, type_extractor< T2 >>> |
Common STL pair specification. | |
template<typename Size , typename Value > | |
using | stl_set = variable_container< Size, Value, std::set< type_extractor< Value >>> |
Common STL set specification. | |
template<typename Size , typename Value > | |
using | stl_multiset = variable_container< Size, Value, std::multiset< type_extractor< Value >>> |
Common STL multiset specification. | |
template<typename Size > | |
using | stl_string = variable_container< Size, char, std::string, true > |
Common STL string specification. | |
using | stl_null_string = terminated_container< char, '\0', std::string > |
Common STL string specification, null terminated. | |
template<typename Size > | |
using | stl_wstring = variable_container< Size, little_endian< wchar_t >, std::wstring > |
Common STL wstring specification. More... | |
using | stl_null_wstring = terminated_container< little_endian< wchar_t >, L'\0', std::wstring > |
Common STL wstring specification, null terminated. More... | |
template<typename Size , typename CharT , typename Traits = std::char_traits <type_extractor <CharT>>, typename Allocator = std::allocator <type_extractor <CharT>>> | |
using | stl_basic_string = variable_container< Size, type_extractor< CharT >, std::basic_string< type_extractor< CharT >, Traits, Allocator >> |
Common STL basic string specification. | |
template<typename CharT , typename Traits = std::char_traits <type_extractor <CharT>>, typename Allocator = std::allocator <type_extractor <CharT>>> | |
using | stl_null_basic_string = terminated_container< type_extractor< CharT >, static_cast< type_extractor< CharT >>(0), std::basic_string< type_extractor< CharT >, Traits, Allocator >> |
Common STL basic string specification, null terminated. | |
template<typename... Types> | |
using | stl_tuple = tuple_container< pack_container< Types...>, std::tuple< type_extractor< Types >...>> |
Common STL tuple specification. | |
template<typename Size , typename T1 , typename T2 > | |
using | stl_unordered_map = variable_container< Size, stl_pair< T1, T2 >, std::unordered_map< type_extractor< T1 >, type_extractor< T2 >>> |
Common STL map specification. | |
template<typename Size , typename T1 , typename T2 > | |
using | stl_unordered_multimap = variable_container< Size, stl_pair< T1, T2 >, std::unordered_multimap< type_extractor< T1 >, type_extractor< T2 >>> |
Common STL multimap specification. | |
template<typename Size , typename Value > | |
using | stl_unordered_set = variable_container< Size, Value, std::unordered_set< type_extractor< Value >>> |
Common STL set specification. | |
template<typename Size , typename Value > | |
using | stl_unordered_multiset = variable_container< Size, Value, std::unordered_multiset< type_extractor< Value >>> |
Common STL multiset specification. | |
template<typename Size , typename Value > | |
using | stl_vector = variable_container< Size, Value, std::vector< type_extractor< Value >>, true > |
Common STL vector specification. | |
template<typename T > | |
using | is_object_type = typename detail::is_object_type_impl< T >::type |
template<typename T > | |
using | is_object_default_serializable = typename detail::is_object_default_serializable_impl< T >::type |
template<typename T , typename Name > | |
using | object_base = typename detail::object_base_impl< T, Name >::type |
template<typename T > | |
using | object_names = typename detail::object_names_impl< T >::type |
template<typename T > | |
using | object_specification = typename detail::object_specification_impl< T >::type |
template<typename Pack , template< typename > class Path> | |
using | extract_values = typename detail::extract_values_impl< Pack, Path >::type |
Extracts value types. More... | |
template<typename Derived , typename... Specification> | |
using | serializable = serializable_implementation< Derived, alias< Specification...>, extract_values< alias< Specification...>, container_specification >, extract_values< alias< Specification...>, container_children >, extract_values< alias< Specification...>, container_children >> |
Implementation alias. More... | |
template<typename Derived , typename... Specification> | |
using | custom_serializable = serializable_implementation< Derived, alias< Specification...>, extract_values< alias< Specification...>, container_specification >, extract_values< alias< Specification...>, container_children >, extract_values< alias< Specification...>, container_children >, false > |
Implementation alias. More... | |
template<typename T > | |
using | is_value_type = typename detail::is_value_type_impl< T >::type |
template<typename T > | |
using | is_value_default_serializable = typename detail::is_value_type_impl< T >::type |
template<typename T > | |
using | value_name = typename detail::value_name_impl< T >::type |
template<typename T > | |
using | value_specification = typename detail::value_specification_impl< T >::type |
template<typename T , typename Derived > | |
using | value_implementation = typename detail::value_implementation_impl< T, Derived >::type |
Functions | |
template<typename Input , typename T > | |
std::enable_if < std::is_arithmetic< T > ::value, bool >::type | read_dispatch (T *, Input &in, T &out) |
Arithmetic read overload. | |
template<typename Output , typename T > | |
std::enable_if < std::is_arithmetic< T > ::value, bool >::type | write_dispatch (T *, T in, Output &out) |
Arithmetic write overload. | |
template<typename Specification , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | dispatch_read (Args &&...args) -> decltype(read_dispatch(static_cast< Specification * >(nullptr), std::forward< Args >(args)...)) |
Dispatched read forwarder. More... | |
template<typename Specification , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | dispatch_write (Args &&...args) -> decltype(write_dispatch(static_cast< Specification * >(nullptr), std::forward< Args >(args)...)) |
Dispatched write forwarder. More... | |
template<std::size_t N, typename Stream > | |
bool | stream_read (Stream &&stream, void *s) |
Stream read forwarder. More... | |
template<typename Stream > | |
bool | stream_read (Stream &&stream, void *s, std::size_t n) |
Stream read forwarder. More... | |
template<std::size_t N, typename Stream > | |
bool | stream_write (Stream &&stream, void const *s) |
Stream write forwarder. More... | |
template<typename Stream > | |
bool | stream_write (Stream &&stream, void const *s, std::size_t n) |
Stream write forwarder. More... | |
template<typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE auto | read (Input &&in, Output &&out) -> decltype(dispatch_read< reference_base< Output >>(std::forward< Input >(in), std::forward< Output >(out))) |
Read forwarder. More... | |
template<typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE auto | write (Input &&in, Output &&out) -> decltype(dispatch_write< reference_base< Input >>(std::forward< Input >(in), std::forward< Output >(out))) |
Write forwarder. More... | |
template<typename Specification , typename Children , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE bool | read_dispatch (container_type< Specification, Children, true > *, Args &&...args) |
Default read overload. More... | |
template<typename Specification , typename Children , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE bool | write_dispatch (container_type< Specification, Children, true > *, Args &&...args) |
Default write overload. More... | |
template<typename Input , typename Output , typename Block , typename... Specification> | |
bool | read_dispatch (bit_field< Block, Specification...> *, Input &in, Output &out) |
Read overload. More... | |
template<typename Input , typename Output , typename Block , typename... Specification> | |
bool | write_dispatch (bit_field< Block, Specification...> *, Input const &in, Output &out) |
Write overload. More... | |
template<typename Type , typename... Specification, typename Input , typename Output > | |
bool | read_dispatch (optional_field< Type, Specification...> *, Input &in, Output &out) |
Read overload. More... | |
template<typename Type , typename... Specification, typename Input , typename Output > | |
bool | write_dispatch (optional_field< Type, Specification...> *, Input const &in, Output &out) |
Write overload. More... | |
template<int64_t Flag, typename Name , typename Specification , template< typename > class Implementation, typename Input , typename Output > | |
bool | read_dispatch (optional_value< Flag, Name, Specification, Implementation > *, Input &in, Output &out) |
Read overload. More... | |
template<int64_t Flag, typename Name , typename Specification , template< typename > class Implementation, typename Input , typename Output > | |
bool | write_dispatch (optional_value< Flag, Name, Specification, Implementation > *, Input const &in, Output &out) |
Write overload. More... | |
template<int64_t Flag, typename Name , typename Specification , template< typename > class Implementation, typename Input , typename Type > | |
bool | write_dispatch (optional_value< Flag, Name, Specification, Implementation > *, Input const &in, output_flags_frame< Type > &out) |
Write overload. More... | |
template<std::size_t N, typename Value , typename Input , typename Output > | |
bool | read_dispatch (bit_value< N, Value > *, Input &in, Output &out) |
Read overload. More... | |
template<std::size_t N, typename Value , typename Input , typename Output > | |
bool | write_dispatch (bit_value< N, Value > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename T , typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE bool | read_dispatch (little_endian< T > *, Input &in, Output &out) |
Read overload. More... | |
template<typename T , typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE bool | write_dispatch (little_endian< T > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename T , typename Input , typename Output > | |
bool | read_dispatch (big_endian< T > *, Input &in, Output &out) |
Read overload. More... | |
template<typename T , typename Input , typename Output > | |
bool | write_dispatch (big_endian< T > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename T , typename Input , typename Output > | |
bool | read_dispatch (pdp_endian< T > *, Input &in, Output &out) |
Read overload. More... | |
template<typename T , typename Input , typename Output > | |
bool | write_dispatch (pdp_endian< T > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename Value , typename Container , typename Input , typename Output > | |
bool | read_dispatch (fixed_container< Value, Container > *, Input &in, Output &out) |
Read overload. More... | |
template<typename Value , typename Container , typename Input , typename Output > | |
bool | write_dispatch (fixed_container< Value, Container > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename Value , type_extractor< Value > Terminator, typename Container , typename Input , typename Output > | |
bool | read_dispatch (terminated_container< Value, Terminator, Container > *, Input &in, Output &out) |
Read overload. More... | |
template<typename Value , type_extractor< Value > Terminator, typename Container , typename Input , typename Output > | |
bool | write_dispatch (terminated_container< Value, Terminator, Container > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename... Parameters, typename Container , typename Input , typename Output > | |
bool | read_dispatch (tuple_container< pack_container< Parameters...>, Container > *, Input &in, Output &out) |
Read overload. More... | |
template<typename... Parameters, typename Container , typename Input , typename Output > | |
bool | write_dispatch (tuple_container< pack_container< Parameters...>, Container > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename Size , typename Value , typename Container , bool Continuous, typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE bool | read_dispatch (variable_container< Size, Value, Container, Continuous > *, Input &in, Output &out) |
Read overload. More... | |
template<typename Size , typename Value , typename Container , bool Continuous, typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE bool | write_dispatch (variable_container< Size, Value, Container, Continuous > *, Input const &in, Output &out) |
Write overload. More... | |
template<typename Size , typename Value , typename Container , typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE std::enable_if< std::is_same < Value, type_extractor< Value > >::value &&std::is_scalar < Value >::value, bool >::type | read_dispatch (variable_container< Size, Value, Container, true > *, Input &in, Output &out) |
Block read overload. More... | |
template<typename Size , typename Value , typename Container , typename Input , typename Output > | |
FRAMEWORK_ALWAYS_INLINE std::enable_if< std::is_same < Value, type_extractor< Value > >::value &&std::is_scalar < Value >::value, bool >::type | write_dispatch (variable_container< Size, Value, Container, true > *, Input const &in, Output &out) |
Block write overload. More... | |
template<typename Name , typename Object , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | get (Object const &t, Args &&...args) -> decltype(interface< Name >(t).get(std::forward< Args >(args)...)) |
Get. | |
template<typename Name , typename Object , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | set (Object &t, Args &&...args) -> decltype(interface< Name >(t).set(std::forward< Args >(args)...)) |
Set. | |
template<typename Name , typename Object , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | check (Object const &t, Args &&...args) -> decltype(interface< Name >(t).check(std::forward< Args >(args)...)) |
Check. | |
template<typename Name , typename Object , typename... Args> | |
FRAMEWORK_ALWAYS_INLINE auto | clear (Object &t, Args &&...args) -> decltype(interface< Name >(t).clear(std::forward< Args >(args)...)) |
Clear. | |
template<typename LhsType , typename RhsType > | |
bool | less (LhsType const &lhs, RhsType const &rhs) |
Less than. | |
template<typename LhsType , typename RhsType > | |
bool | greater (LhsType const &lhs, RhsType const &rhs) |
Greater than. | |
template<typename LhsType , typename RhsType > | |
bool | less_or_equal (LhsType const &lhs, RhsType const &rhs) |
Less than or equal to. | |
template<typename LhsType , typename RhsType > | |
bool | greater_or_equal (LhsType const &lhs, RhsType const &rhs) |
Greater than or equal to. | |
template<typename LhsType , typename RhsType > | |
bool | equal (LhsType const &lhs, RhsType const &rhs) |
Equal to. | |
template<typename LhsType , typename RhsType > | |
bool | not_equal (LhsType const &lhs, RhsType const &rhs) |
Not equal. | |
template<typename Name , typename Object > | |
FRAMEWORK_ALWAYS_INLINE auto | interface (Object &t) -> object_base< Object, Name > & |
template<typename Name , typename Object > | |
FRAMEWORK_ALWAYS_INLINE auto | interface (Object const &t) -> object_base< Object, Name > const & |
template<typename Name , typename Specification , template< typename > class Interface, typename Input , typename Output > | |
bool | read_dispatch (value_type< Name, Specification, Interface, true > *, Input &&in, Output &&out) |
Default read overload. More... | |
template<typename Name , typename Specification , template< typename > class Interface, typename Input , typename Output > | |
bool | write_dispatch (value_type< Name, Specification, Interface, true > *, Input &&in, Output &&out) |
Default write overload. More... | |
Serializable namespace.
using framework::serializable::container_children = typedef typename detail::container_children_impl <T>::type |
Retrieves a container type's children.
using framework::serializable::container_specification = typedef typename detail::container_specification_impl <T>::type |
Retrieves a container type's specification.
using framework::serializable::custom_serializable = typedef serializable_implementation < Derived, alias <Specification...>, extract_values <alias <Specification...>, container_specification>, extract_values <alias <Specification...>, container_children>, extract_values <alias <Specification...>, container_children>, false> |
Implementation alias.
Custom serializable_implementation alias; no default marshalling functions are provided for the derived type.
Derived | derived class |
Specification | child types |
using framework::serializable::extract_values = typedef typename detail::extract_values_impl <Pack, Path>::type |
Extracts value types.
Generates a pack_container
of all value types accessible from T
, using the Path
template to define the child nodes of container types. For example, the following two result types are equivalent:
T | container type |
Path | path to follow through the tree |
using framework::serializable::is_container_default_serializable = typedef typename detail::is_container_default_serializable_impl <T>::type |
Type trait testing whether or not T is a default serializable contaier_type
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_container_type = typedef typename detail::is_container_type_impl <T>::type |
Type trait testing whether or not T is a container_type
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_mutator_type = typedef typename detail::is_mutator_type_impl <T>::type |
Type trait testing whether or not T is a container_type
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_object_default_serializable = typedef typename detail::is_object_default_serializable_impl <T>::type |
Type trait testing whether or not T is a default serializable serializable_implementation
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_object_type = typedef typename detail::is_object_type_impl <T>::type |
Type trait testing whether or not T derives from serializable_implementation
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_value_default_serializable = typedef typename detail::is_value_type_impl <T>::type |
Type trait testing whether or not T is a default serializable value_type
, equivalent to either std::true_type or std::false_type.
using framework::serializable::is_value_type = typedef typename detail::is_value_type_impl <T>::type |
Type trait testing whether or not T is a value_type
, equivalent to either std::true_type or std::false_type.
using framework::serializable::mutator_child = typedef typename detail::mutator_child_impl <T>::type |
Retrieves a mutator's child type.
using framework::serializable::object_base = typedef typename detail::object_base_impl <T, Name>::type |
Gets the base type associated with Name
in T
.
using framework::serializable::object_names = typedef typename detail::object_names_impl <T>::type |
Constructs a pack_container
of every visible value name in T
.
using framework::serializable::object_specification = typedef typename detail::object_specification_impl <T>::type |
Gets the specification associated with T.
using framework::serializable::serializable = typedef serializable_implementation < Derived, alias <Specification...>, extract_values <alias <Specification...>, container_specification>, extract_values <alias <Specification...>, container_children>, extract_values <alias <Specification...>, container_children>> |
Implementation alias.
Default serializable_implementation alias.
Derived | derived class |
Specification | child types |
using framework::serializable::stl_null_wstring = typedef terminated_container <little_endian <wchar_t>, L'\0', std::wstring> |
Common STL wstring specification, null terminated.
Size
, Value>
) would introduce an implicit constraints or unusual mutator syntax. If this default is inadequate the stl_null_basic_string
template should be used instead. using framework::serializable::stl_wstring = typedef variable_container <Size, little_endian <wchar_t>, std::wstring> |
Common STL wstring specification.
Size
, Value>
) would introduce an implicit constraints or unusual mutator syntax. If this default is inadequate the stl_basic_string
template should be used instead. using framework::serializable::type_extractor = typedef typename detail::type_extractor_impl <T>::type |
Mutator type extractor.
Extracts the underlying type, defined recursively as
if T
is a mutator type, and T
otherwise.
using framework::serializable::value_implementation = typedef typename detail::value_implementation_impl <T, Derived>::type |
Instantiates a value type's implementation with the parameter Derived
, storing the result in type
.
using framework::serializable::value_name = typedef typename detail::value_name_impl <T>::type |
Retrieves a value type's name.
using framework::serializable::value_specification = typedef typename detail::value_specification_impl <T>::type |
Retrieves a value type's specification.
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::dispatch_read | ( | Args &&... | args) | -> decltype(read_dispatch( static_cast <Specification*> (nullptr), std::forward <Args> (args)...)) |
Dispatched read forwarder.
Uses the explicitly specified specification to serialize the object.
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::dispatch_write | ( | Args &&... | args) | -> decltype(write_dispatch( static_cast <Specification*> (nullptr), std::forward <Args> (args)...)) |
Dispatched write forwarder.
Uses the explicitly specified specification to serialize the object.
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::interface | ( | Object & | t) | -> object_base <Object, Name>& |
Returns a reference to the implementation associated with Name
in Object
. This method should be preferred over the get/set/... free functions when marshalling data; implementations may need to protect necessary methods.
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::interface | ( | Object const & | t) | -> object_base <Object, Name> const& |
Returns a constant reference to the implementation associated with Name
in Object
. This method should be preferred over the get/set/... free functions when marshalling data; implementations may need to protect necessary methods.
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::read | ( | Input && | in, |
Output && | out | ||
) | -> decltype(dispatch_read <reference_base <Output>> ( std::forward <Input> (in), std::forward <Output> (out))) |
Read forwarder.
Uses the output object's type as it's specification, generally equivalent to:
bool framework::serializable::read_dispatch | ( | bit_field< Block, Specification...> * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
in | input stream |
out | output object |
bool framework::serializable::read_dispatch | ( | fixed_container< Value, Container > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
in | input stream |
out | output container |
bool framework::serializable::read_dispatch | ( | terminated_container< Value, Terminator, Container > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads elements into out
from the input stream using the specification given by Value
until the value read matches Terminator
. The terminating character is not added to out
.
in | input stream |
out | output container |
bool framework::serializable::read_dispatch | ( | tuple_container< pack_container< Parameters...>, Container > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads the container's elements from an input stream using the specification list Parameters
.
in | input stream |
out | output container |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::read_dispatch | ( | variable_container< Size, Value, Container, Continuous > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads the container from an input stream as a size delimited list.
in | input stream |
out | output container |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::read_dispatch | ( | little_endian< T > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads a value of type T from an input stream using little endian byte ordering.
in | input stream |
out | output value |
bool framework::serializable::read_dispatch | ( | bit_value< N, Value > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
in | input stream |
out | output value |
bool framework::serializable::read_dispatch | ( | big_endian< T > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads a value of type T from an input stream using big endian byte ordering.
in | input stream |
out | output value |
bool framework::serializable::read_dispatch | ( | optional_field< Type, Specification...> * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
in | input stream |
out | output object |
FRAMEWORK_ALWAYS_INLINE std::enable_if< std::is_same <Value, type_extractor <Value> >::value && std::is_scalar <Value>::value, bool >::type framework::serializable::read_dispatch | ( | variable_container< Size, Value, Container, true > * | , |
Input & | in, | ||
Output & | out | ||
) |
Block read overload.
in | input stream |
out | output container |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::read_dispatch | ( | container_type< Specification, Children, true > * | , |
Args &&... | args | ||
) |
Default read overload.
Serializes each element of container_children <Specification> in the order it appears.
args | deserialization arguments, usually an input stream followed by an output container |
bool framework::serializable::read_dispatch | ( | pdp_endian< T > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Reads a value of type T from an input stream using pdp endian byte ordering.
in | input stream |
out | output value |
bool framework::serializable::read_dispatch | ( | value_type< Name, Specification, Interface, true > * | , |
Input && | in, | ||
Output && | out | ||
) |
Default read overload.
in | input stream |
out | output container |
bool framework::serializable::read_dispatch | ( | optional_value< Flag, Name, Specification, Implementation > * | , |
Input & | in, | ||
Output & | out | ||
) |
Read overload.
Conditionally reads the underlying value.
in | input stream |
out | output object |
bool framework::serializable::stream_read | ( | Stream && | stream, |
void * | s | ||
) |
Stream read forwarder.
Used to forward a fixed-byte read call to the underlying stream object. Equivalent to one of the following two calls, in order of precedence:
bool framework::serializable::stream_read | ( | Stream && | stream, |
void * | s, | ||
std::size_t | n | ||
) |
Stream read forwarder.
Used to forward a fixed-byte read call to the underlying stream object. Equivalent to the following:
bool framework::serializable::stream_write | ( | Stream && | stream, |
void const * | s | ||
) |
Stream write forwarder.
Used to forward a fixed-byte write call to the underlying stream object. Equivalent to one of the following two calls, in order of precedence:
bool framework::serializable::stream_write | ( | Stream && | stream, |
void const * | s, | ||
std::size_t | n | ||
) |
Stream write forwarder.
Used to forward a fixed-byte write call to the underlying stream object. Equivalent to the following:
FRAMEWORK_ALWAYS_INLINE auto framework::serializable::write | ( | Input && | in, |
Output && | out | ||
) | -> decltype(dispatch_write <reference_base <Input>> ( std::forward <Input> (in), std::forward <Output> (out))) |
Write forwarder.
Uses the input object's type as it's specification.
bool framework::serializable::write_dispatch | ( | bit_field< Block, Specification...> * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
in | input object |
out | output stream |
bool framework::serializable::write_dispatch | ( | fixed_container< Value, Container > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
in | input container |
out | output stream |
bool framework::serializable::write_dispatch | ( | tuple_container< pack_container< Parameters...>, Container > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Wries the container's elements to an output stream using the specification list Parameters
.
in | input container |
out | output stream |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::write_dispatch | ( | little_endian< T > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Writes a value of type T to an output stream using little endian byte ordering.
in | input value |
out | output stream |
bool framework::serializable::write_dispatch | ( | terminated_container< Value, Terminator, Container > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Writes elements to the output stream from in
using the specification given by Value
until the value matches Terminator
. The terminating character is not added to out
.
in | input container |
out | output stream |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::write_dispatch | ( | variable_container< Size, Value, Container, Continuous > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Writes the container to an output stream as a size delimited list.
in | input stream |
out | output container |
bool framework::serializable::write_dispatch | ( | bit_value< N, Value > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
in | input value |
out | output stream |
bool framework::serializable::write_dispatch | ( | big_endian< T > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Writes a value of type T to an output stream using big endian byte ordering.
in | input value |
out | output stream |
bool framework::serializable::write_dispatch | ( | optional_field< Type, Specification...> * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
in | input object |
out | output stream |
FRAMEWORK_ALWAYS_INLINE bool framework::serializable::write_dispatch | ( | container_type< Specification, Children, true > * | , |
Args &&... | args | ||
) |
Default write overload.
Serializes each element of container_children <Specification> in the order it appears.
args | serialization arguments, usually an input container followed by an output stream |
FRAMEWORK_ALWAYS_INLINE std::enable_if< std::is_same <Value, type_extractor <Value> >::value && std::is_scalar <Value>::value, bool >::type framework::serializable::write_dispatch | ( | variable_container< Size, Value, Container, true > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Block write overload.
in | input stream |
out | output container |
bool framework::serializable::write_dispatch | ( | value_type< Name, Specification, Interface, true > * | , |
Input && | in, | ||
Output && | out | ||
) |
Default write overload.
in | input stream |
out | output container |
bool framework::serializable::write_dispatch | ( | pdp_endian< T > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Writes a value of type T to an output stream using pdp endian byte ordering.
in | input value |
out | output stream |
bool framework::serializable::write_dispatch | ( | optional_value< Flag, Name, Specification, Implementation > * | , |
Input const & | in, | ||
Output & | out | ||
) |
Write overload.
Conditionally writes the underlying value.
in | input stream |
out | output object |
bool framework::serializable::write_dispatch | ( | optional_value< Flag, Name, Specification, Implementation > * | , |
Input const & | in, | ||
output_flags_frame< Type > & | out | ||
) |
Write overload.
Writes the object state to a flags stream.
in | input stream |
out | output object |