OSVR-Core
Public Types | Static Public Member Functions | List of all members
osvr::common::serialization::ArithmeticSerializationTraits< T, Alignment > Struct Template Reference

Serialization traits for a given arithmetic type (that is, a number type that has a network byte order) with a specified alignment. More...

#include <SerializationTraits.h>

Inheritance diagram for osvr::common::serialization::ArithmeticSerializationTraits< T, Alignment >:
osvr::common::serialization::BaseSerializationTraits< T >

Public Types

typedef BaseSerializationTraits< TBase
 
typedef T type
 
- Public Types inherited from osvr::common::serialization::BaseSerializationTraits< T >
typedef T type
 
typedef boost::call_traits< type >::param_type param_type
 
typedef boost::call_traits< type >::value_type value_type
 
typedef boost::call_traits< type >::reference reference_type
 

Static Public Member Functions

template<typename BufferType , typename Tag >
static void serialize (BufferType &buf, typename Base::param_type val, Tag const &)
 Buffers an object of this type.
 
template<typename BufferReaderType , typename Tag >
static void deserialize (BufferReaderType &buf, typename Base::reference_type val, Tag const &)
 Reads an object of this type from a buffer.
 
template<typename Tag >
static size_t spaceRequired (size_t existingBytes, typename Base::param_type, Tag const &)
 Returns the number of bytes required for this type (and alignment padding if applicable) to be appended to a buffer of the supplied existing size. More...
 

Detailed Description

template<typename T, size_t Alignment>
struct osvr::common::serialization::ArithmeticSerializationTraits< T, Alignment >

Serialization traits for a given arithmetic type (that is, a number type that has a network byte order) with a specified alignment.

Member Function Documentation

§ spaceRequired()

template<typename T, size_t Alignment>
template<typename Tag >
static size_t osvr::common::serialization::ArithmeticSerializationTraits< T, Alignment >::spaceRequired ( size_t  existingBytes,
typename Base::param_type  ,
Tag const &   
)
inlinestatic

Returns the number of bytes required for this type (and alignment padding if applicable) to be appended to a buffer of the supplied existing size.


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