Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches

◆ setUpdater()

template<typename Key, typename Value, typename UpdateTag>
template<typename UpdateValue>
void DataStorm::Topic< Key, Value, UpdateTag >::setUpdater ( const UpdateTag & tag,
std::function< void(Value &, UpdateValue)> updater )
noexcept

Sets an updater function for the given update tag.

The function is called when a partial update is received or sent to compute the new value. The function is provided the latest value and the partial update. It should return the new value. An updater that throws when applying a received partial update causes the sample to be dropped: a warning is logged and the following samples are delivered normally.

Parameters
tagThe update tag.
updaterThe updater function.

Definition at line 1652 of file DataStorm.h.