The Writer class is used to write samples for a data element. More...
#include <DataStorm/DataStorm.h>
Public Types | |
using | KeyType = Key |
The key type. | |
using | ValueType = Value |
The value type. |
Public Member Functions | |
Writer (Writer &&writer) noexcept | |
Move constructor. | |
~Writer () | |
Destructor. | |
std::vector< Sample< Key, Value, UpdateTag > > | getAll () |
Gets all the written sample kept in the writer history. | |
std::vector< Key > | getConnectedKeys () const |
Gets the keys for which readers are connected to this writer. | |
std::vector< std::string > | getConnectedReaders () const |
Gets the connected readers. | |
Sample< Key, Value, UpdateTag > | getLast () |
Gets the last written sample. | |
bool | hasReaders () const noexcept |
Indicates whether or not readers are online. | |
void | onConnectedKeys (std::function< void(std::vector< Key >)> init, std::function< void(CallbackReason, Key)> update) noexcept |
Calls the given functions to provide the initial set of connected keys and when a key is added or removed from the set of connected keys. | |
void | onConnectedReaders (std::function< void(std::vector< std::string >)> init, std::function< void(CallbackReason, std::string)> update) noexcept |
Calls the given functions to provide the initial set of connected readers and when a new reader connects or disconnects. | |
Writer & | operator= (Writer &&writer) noexcept |
Move assignment operator. | |
void | waitForNoReaders () const |
Waits for readers to be offline. | |
void | waitForReaders (unsigned int count=1) const |
Waits for the given number of readers to be online. |
The Writer class is used to write samples for a data element.
Definition at line 209 of file DataStorm.h.