Commit 1d1109f7 authored by Dominik Charousset's avatar Dominik Charousset

Add getter for current filter

parent 1754baa5
...@@ -59,13 +59,20 @@ public: ...@@ -59,13 +59,20 @@ public:
// -- properties ------------------------------------------------------------- // -- properties -------------------------------------------------------------
/// Sets the filter for `x` to `f` and inserts `x` into the appropriate lane. /// Sets the filter for `slot` to `filter`. Inserts a new element if `slot`
/// @pre `x` is not registered on *any* lane /// is a new path.
void set_filter(stream_slot slot, filter_type filter) { void set_filter(stream_slot slot, filter_type filter) {
CAF_LOG_TRACE(CAF_ARG(slot) << CAF_ARG(filter)); CAF_LOG_TRACE(CAF_ARG(slot) << CAF_ARG(filter));
state_map_[slot].filter = std::move(filter); state_map_[slot].filter = std::move(filter);
} }
/// Returns the filter for `slot`. Inserts a new element if `slot` is a new
/// path.
filter_type& filter(stream_slot slot) {
CAF_LOG_TRACE(CAF_ARG(slot));
return state_map_[slot].filter;
}
/// Returns the broadcast states for all paths. /// Returns the broadcast states for all paths.
state_map_type& states() { state_map_type& states() {
return state_map_; return state_map_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment