PdCom  5.3
Process data communication client
Loading...
Searching...
No Matches
PdCom::DataDeserializer< Derived > Struct Template Reference

Data Deserialisation helper. More...

#include <DataDeserializer.h>

Public Member Functions

template<typename T>
std::enable_if<!std::is_arithmetic< T >::value, void >::type getValue (T &dest, size_t offset=0) const
 Copy the values into a custom buffer.
 
template<typename T>
std::enable_if< std::is_arithmetic< T >::value, void >::type getValue (T &dest, size_t offset=0) const
 Copy the values into a custom buffer.
 
template<typename T, size_t M, size_t N>
void getValue (T(&dest)[M][N]) const
 
template<typename T, size_t N>
void getValue (T(&dest)[N], size_t offset=0) const
 
template<typename T>
getValue () const
 

Detailed Description

template<class Derived>
struct PdCom::DataDeserializer< Derived >

Data Deserialisation helper.

This class is used to extract the values from the buffer as requested by the library user. It is expected that Derived has at least a getData() member which returns a pointer to the buffer and a getVariable() member which returns the corresponding variable.

Member Function Documentation

◆ getValue() [1/2]

template<class Derived>
template<typename T>
std::enable_if<!std::is_arithmetic< T >::value, void >::type PdCom::DataDeserializer< Derived >::getValue ( T & dest,
size_t offset = 0 ) const
inline

Copy the values into a custom buffer.

Up to buf.size() values are converted into the type of the buffer. This overload accepts a container like std::vector , but also non-contiguous containers like std::list are supported. A member typedef value_type and a size() member are expected.

Parameters
destCustom buffer.

◆ getValue() [2/2]

template<class Derived>
template<typename T>
std::enable_if< std::is_arithmetic< T >::value, void >::type PdCom::DataDeserializer< Derived >::getValue ( T & dest,
size_t offset = 0 ) const
inline

Copy the values into a custom buffer.

Parameters
destCustom buffer.

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