DataStorm  0.1
Data Distribution Service
Static Public Member Functions | List of all members
DataStorm::Encoder< T, Enabler > Struct Template Reference

The Encoder template provides a method to encode decode user types. More...

#include <DataStorm/DataStorm.h>

Static Public Member Functions

static std::vector< unsigned char > encode (const std::shared_ptr< Ice::Communicator > &communicator, const T &value) noexcept
 Encode the given value. More...

Detailed Description

template<typename T, typename Enabler = void>
struct DataStorm::Encoder< T, Enabler >

The Encoder template provides a method to encode decode user types.

The encoder template can be specialized to provide encoding for types that don't support being encoded with Ice. By default, the Ice encoding is used if no Encoder template specialization is provided for the type.

Member Function Documentation

◆ encode()

template<typename T , typename E >
std::vector< unsigned char > DataStorm::Encoder< T, E >::encode ( const std::shared_ptr< Ice::Communicator > &  communicator,
const T &  value 

Encode the given value.

Encoder template implementation.

This method encodes the given value and returns the resulting byte sequence. The communicator parameter is provided to allow the implementation to eventually use the Ice encoding.

See also
communicatorThe communicator associated with the node
valueThe value to encode
The resulting byte sequence

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