Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
DataStorm::Writer< Key, Value, UpdateTag > Class Template Reference

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.
Writeroperator= (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.

Detailed Description

template<typename Key, typename Value, typename UpdateTag>
class DataStorm::Writer< Key, Value, UpdateTag >

The Writer class is used to write samples for a data element.

Definition at line 209 of file DataStorm.h.


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