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

◆ setKeyFilter()

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

Sets a key filter factory.

The given factory function must return a filter function that returns true if the key matches the filter criteria, false otherwise. Register all key 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 key filter.
factoryThe filter factory function.

Definition at line 1703 of file DataStorm.h.