fpmas 1.6
Static Public Member Functions | List of all members
fpmas::synchro::DataUpdate< T > Struct Template Reference

#include <synchro.h>

Static Public Member Functions

static void update (T &local_data, T &&updated_data)
 

Detailed Description

template<typename T>
struct fpmas::synchro::DataUpdate< T >

Generic structure to update local data from a temporary updated data instance.

The principle of the update() method is to pull updates into the local data. By default, this is performed using an std::move operation, but specializations might introduce specific behaviors for some type T.

Member Function Documentation

◆ update()

template<typename T >
static void fpmas::synchro::DataUpdate< T >::update ( T &  local_data,
T &&  updated_data 
)
inlinestatic

Updates local_data from updated_data.

By default, performs local_data = std::move(updated_data), so the move assignment operator T::operator=(T&&) is used, in order to maximize performances and avoid useless copies.

Parameters
local_datareference to the local data to update
updated_datareference to the temporary updated data that must be pulled into local data. updated_data can be "consumed" in the process, i.e. left in an undefined/void state.

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