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

The Cloner template provides a method to clone user types. More...

#include <DataStorm/DataStorm.h>

Static Public Member Functions

static T clone (const T &value) noexcept
 Clone the given value. More...
 

Detailed Description

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

The Cloner template provides a method to clone user types.

The cloner template can be specialized to provide cloning for types that require special cloning. By defaut, the template uses plain C++ copy.

Member Function Documentation

◆ clone()

template<typename T , typename Enabler = void>
static T DataStorm::Cloner< T, Enabler >::clone ( const T &  value)
inlinestaticnoexcept

Clone the given value.

This helper is used when processing partial update to clone the previous value and compute the new value with the partial update. The default implementation performs a plain C++ copy with the copy constructor.

Parameters
valueThe value to encode
Returns
The cloned value

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