gramods
|
Simple, multi value (vector) synchronizeable data container, without support for pointers or types containing pointers. More...
#include <SyncMData.hh>
Public Member Functions | |
SyncMData () | |
Initializes the SyncMData to an empty list. More... | |
SyncMData (std::vector< TYPE > val) | |
Initializes the SyncMData to the specified value. More... | |
SyncMData (SyncMData< TYPE > &&s) | |
operator std::vector< TYPE > () const | |
Retrieves the front vector of the container. More... | |
TYPE | operator[] (size_t idx) const |
Retrieves the indexed values from the front vector of the container. More... | |
SyncMData< TYPE > & | operator= (std::vector< TYPE > val) |
Sets the back value of the container and immediately sends it to the back value of connected peers. More... | |
Protected Member Functions | |
void | encode (std::vector< char > &d) override |
Encodes the back data of the container into the specified vector, using vector indices 1-N and leaving the zeroth cell empty. More... | |
void | decode (std::vector< char > d) override |
Decodes the specified vector into the back data of the container, using vector indices 1-N. More... | |
void | update () override |
Copies the back value to the front. More... | |
![]() | |
void | pushValue () |
Called by sub classes when the value has been set, to push the value to peers. More... | |
Simple, multi value (vector) synchronizeable data container, without support for pointers or types containing pointers.
Observe that this container is not optimized for synchronization of large amounts of data.
|
inline |
Initializes the SyncMData to an empty list.
|
inline |
Initializes the SyncMData to the specified value.
|
inlineoverrideprotectedvirtual |
Decodes the specified vector into the back data of the container, using vector indices 1-N.
Implements gramods::gmNetwork::SyncData.
|
inlineoverrideprotectedvirtual |
Encodes the back data of the container into the specified vector, using vector indices 1-N and leaving the zeroth cell empty.
Implements gramods::gmNetwork::SyncData.
|
inline |
Retrieves the front vector of the container.
|
inline |
Sets the back value of the container and immediately sends it to the back value of connected peers.
|
inline |
Retrieves the indexed values from the front vector of the container.
|
inlineoverrideprotectedvirtual |
Copies the back value to the front.
Implements gramods::gmNetwork::SyncData.