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

◆ setSampleFilter()

template<typename Key, typename Value, typename UpdateTag>
template<typename Criteria>
void DataStorm::Topic< Key, Value, UpdateTag >::setSampleFilter ( std::string name,
std::function< std::function< bool(const SampleType &)>(const Criteria &)> factory )
noexcept

Sets a sample filter factory.

The given factory function must return a filter function that returns true if the sample matches the filter criteria, false otherwise. Register all sample filters before creating any reader or writer for this topic: the set of filters is not synchronized, so modifying it once the topic is in use races with the Ice threads that use the topic.

Parameters
nameThe name of the sample filter.
factoryThe filter factory function.

Definition at line 1713 of file DataStorm.h.