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

The Reader class is used to retrieve 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

 Reader (Reader &&reader) noexcept
 Move constructor.
 ~Reader ()
 Destructor.
std::vector< Sample< Key, Value, UpdateTag > > getAllUnread ()
 Returns all the unread samples.
std::vector< Key > getConnectedKeys () const
 Gets the keys for which writers are connected to this reader.
std::vector< std::string > getConnectedWriters () const
 Gets the connected writers.
Sample< Key, Value, UpdateTag > getNextUnread ()
 Returns the next unread sample.
bool hasUnread () const noexcept
 Returns whether or not unread samples are available.
bool hasWriters () const noexcept
 Indicates whether or not writers 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 onConnectedWriters (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 writers and when a new writer connects or disconnects.
void onSamples (std::function< void(std::vector< Sample< Key, Value, UpdateTag > >)> init, std::function< void(Sample< Key, Value, UpdateTag >)> queue) noexcept
 Calls the given function to provide the initial set of unread samples and when new samples are queued.
Readeroperator= (Reader &&reader) noexcept
 Move assignment operator.
void waitForNoWriters () const
 Waits for writers to be offline.
void waitForUnread (unsigned int count=1) const
 Waits for the given number of unread samples to be available.
void waitForWriters (unsigned int count=1) const
 Waits for the given number of writers to be online.

Detailed Description

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

The Reader class is used to retrieve samples for a data element.

Definition at line 108 of file DataStorm.h.


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