Commit 37652efa authored by Dominik Charousset's avatar Dominik Charousset

Grant users access filtering downstream lanes

parent aac42910
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "caf/downstream.hpp" #include "caf/downstream.hpp"
#include "caf/meta/type_name.hpp"
namespace caf { namespace caf {
/// A filtering downstream allows stages to fork into multiple lanes, where /// A filtering downstream allows stages to fork into multiple lanes, where
...@@ -45,6 +47,10 @@ public: ...@@ -45,6 +47,10 @@ public:
struct lane { struct lane {
typename super::queue_type queue; typename super::queue_type queue;
typename super::path_ptr_list paths; typename super::path_ptr_list paths;
template <class Inspector>
friend typename Inspector::result_type inspect(Inspector& f, lane& x) {
return f(meta::type_name("lane"), x.queue, x.paths);
}
}; };
/// Identifies a lane inside the downstream. Filters are kept in sorted order /// Identifies a lane inside the downstream. Filters are kept in sorted order
...@@ -110,6 +116,10 @@ public: ...@@ -110,6 +116,10 @@ public:
lanes_[std::move(f)].paths.push_back(super::find(x)); lanes_[std::move(f)].paths.push_back(super::find(x));
} }
const lanes_map& lanes() const {
return lanes_;
}
private: private:
void erase_from_lanes(const strong_actor_ptr& x) { void erase_from_lanes(const strong_actor_ptr& x) {
for (auto i = lanes_.begin(); i != lanes_.end(); ++i) for (auto i = lanes_.begin(); i != lanes_.end(); ++i)
......
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