diff --git a/xo-reactor/include/xo/reactor/AbstractEventProcessor.hpp b/xo-reactor/include/xo/reactor/AbstractEventProcessor.hpp index aa04a1c8..e955a40c 100644 --- a/xo-reactor/include/xo/reactor/AbstractEventProcessor.hpp +++ b/xo-reactor/include/xo/reactor/AbstractEventProcessor.hpp @@ -30,7 +30,7 @@ namespace xo { /* visit direct downstream consumers c[i] of this event processor. * call ep(c[i]) for each such consumer. */ - virtual void visit_direct_consumers(std::function ep)> const & fn) = 0; + virtual void visit_direct_consumers(std::function ep)> const & fn) = 0; /* write representation to stream */ virtual void display(std::ostream & os) const = 0; diff --git a/xo-reactor/include/xo/reactor/FifoQueue.hpp b/xo-reactor/include/xo/reactor/FifoQueue.hpp index 1d1439d2..8f0b48a4 100644 --- a/xo-reactor/include/xo/reactor/FifoQueue.hpp +++ b/xo-reactor/include/xo/reactor/FifoQueue.hpp @@ -60,7 +60,7 @@ namespace xo { if (reactor) { if (is_priming) { /* reactor/simulator takes delivery/sequencing responsibility from here */ - reactor->notify_source_primed(ref::brw::from_native(this)); + reactor->notify_source_primed(bp::from_native(this)); } } else { /* if no reactor, deliver immediately */ @@ -181,7 +181,7 @@ namespace xo { virtual std::string const & name() const override { return name_; } virtual void set_name(std::string const & x) override { this->name_ = x; } - virtual void visit_direct_consumers(std::function ep)> const & fn) override { + virtual void visit_direct_consumers(std::function ep)> const & fn) override { for (auto x : this->cb_set_) fn(x.fn_.borrow()); } /*visit_direct_consumers*/ diff --git a/xo-reactor/include/xo/reactor/PollingReactor.hpp b/xo-reactor/include/xo/reactor/PollingReactor.hpp index be4dd028..2a0aca80 100644 --- a/xo-reactor/include/xo/reactor/PollingReactor.hpp +++ b/xo-reactor/include/xo/reactor/PollingReactor.hpp @@ -17,9 +17,9 @@ namespace xo { // ----- inherited from Reactor ----- - virtual bool add_source(ref::brw src) override; - virtual bool remove_source(ref::brw src) override; - virtual void notify_source_primed(ref::brw src) override; + virtual bool add_source(bp src) override; + virtual bool remove_source(bp src) override; + virtual void notify_source_primed(bp src) override; virtual std::uint64_t run_one() override; private: diff --git a/xo-reactor/include/xo/reactor/PolyAdapterSink.hpp b/xo-reactor/include/xo/reactor/PolyAdapterSink.hpp index e5e56c69..9104ddc2 100644 --- a/xo-reactor/include/xo/reactor/PolyAdapterSink.hpp +++ b/xo-reactor/include/xo/reactor/PolyAdapterSink.hpp @@ -67,7 +67,7 @@ namespace xo { virtual std::string const & name() const override { return this->poly_sink_->name(); } virtual void set_name(std::string const & x) override { this->poly_sink_->set_name(x); } - virtual void visit_direct_consumers(std::function ep)> const & fn) override { + virtual void visit_direct_consumers(std::function ep)> const & fn) override { this->poly_sink_->visit_direct_consumers(fn); } virtual void display(std::ostream & os) const override { diff --git a/xo-reactor/include/xo/reactor/Reactor.hpp b/xo-reactor/include/xo/reactor/Reactor.hpp index 229b7421..4b0d6bc9 100644 --- a/xo-reactor/include/xo/reactor/Reactor.hpp +++ b/xo-reactor/include/xo/reactor/Reactor.hpp @@ -25,7 +25,7 @@ namespace xo { * * returns true if source added; false if already present */ - virtual bool add_source(ref::brw src) = 0; + virtual bool add_source(bp src) = 0; /* remove source src from this reactor. * source must previously have been added by @@ -35,12 +35,12 @@ namespace xo { * * returns true if source removed; false if not present */ - virtual bool remove_source(ref::brw src) = 0; + virtual bool remove_source(bp src) = 0; /* notification when non-primed source (source with no known events) * becomes primed (source with at least one event) */ - virtual void notify_source_primed(ref::brw src) = 0; + virtual void notify_source_primed(bp src) = 0; /* dispatch one reactor event, borrowing the calling thread * amount of work this represents is Source/Sink specific. diff --git a/xo-reactor/include/xo/reactor/SecondarySource.hpp b/xo-reactor/include/xo/reactor/SecondarySource.hpp index 5b186b83..00459e98 100644 --- a/xo-reactor/include/xo/reactor/SecondarySource.hpp +++ b/xo-reactor/include/xo/reactor/SecondarySource.hpp @@ -101,7 +101,7 @@ namespace xo { if (reactor) { if (is_priming) { /* reactor/simulator takes responsibility for delivering events */ - reactor->notify_source_primed(ref::brw::from_native(this)); + reactor->notify_source_primed(bp::from_native(this)); } } else { /* special case if no reactor: deliver immediately */ @@ -225,7 +225,7 @@ namespace xo { virtual std::string const & name() const override { return name_; } virtual void set_name(std::string const & x) override { this->name_ = x; } - virtual void visit_direct_consumers(std::function ep)> const & fn) override { + virtual void visit_direct_consumers(std::function ep)> const & fn) override { for(auto x : this->cb_set_) fn(x.fn_.borrow()); @@ -275,7 +275,7 @@ namespace xo { if (reactor) { if (is_priming) { /* reactor/simulator takes responsibility for delivering events */ - reactor->notify_source_primed(ref::brw::from_native(this)); + reactor->notify_source_primed(bp::from_native(this)); } } else { /* if no reactor, deliver immediately */ diff --git a/xo-reactor/include/xo/reactor/Sink.hpp b/xo-reactor/include/xo/reactor/Sink.hpp index a5f29a03..8a37ffd2 100644 --- a/xo-reactor/include/xo/reactor/Sink.hpp +++ b/xo-reactor/include/xo/reactor/Sink.hpp @@ -141,7 +141,7 @@ namespace xo { virtual std::string const & name() const override { return name_; } virtual void set_name(std::string const & x) override { name_ = x; } - virtual void visit_direct_consumers(std::function)> const &) override { + virtual void visit_direct_consumers(std::function)> const &) override { /* *this is not an event source */ } /*visit_direct_consumers*/ diff --git a/xo-reactor/src/reactor/AbstractEventProcessor.cpp b/xo-reactor/src/reactor/AbstractEventProcessor.cpp index 55939ab1..824024cf 100644 --- a/xo-reactor/src/reactor/AbstractEventProcessor.cpp +++ b/xo-reactor/src/reactor/AbstractEventProcessor.cpp @@ -6,7 +6,6 @@ #include namespace xo { - using ref::brw; using xo::tostr; using std::uint32_t; @@ -16,7 +15,7 @@ namespace xo { * add to *m; */ void - map_network_helper(brw x, + map_network_helper(bp x, uint32_t * tsort_ix, std::unordered_map * m) { @@ -24,7 +23,7 @@ namespace xo { return; auto fn = [tsort_ix, m] - (brw ep) + (bp ep) { map_network_helper(ep, tsort_ix, m); }; diff --git a/xo-reactor/src/reactor/PollingReactor.cpp b/xo-reactor/src/reactor/PollingReactor.cpp index c8c9fe66..08316748 100644 --- a/xo-reactor/src/reactor/PollingReactor.cpp +++ b/xo-reactor/src/reactor/PollingReactor.cpp @@ -3,14 +3,13 @@ #include "PollingReactor.hpp" namespace xo { - using ref::brw; using std::size_t; using std::uint64_t; using std::int64_t; namespace reactor { bool - PollingReactor::add_source(brw src) + PollingReactor::add_source(bp src) { /* make sure src does not already appear in .source_v[] */ for(ReactorSourcePtr const & x : this->source_v_) { @@ -28,7 +27,7 @@ namespace xo { } /*add_source*/ bool - PollingReactor::remove_source(brw src) + PollingReactor::remove_source(bp src) { auto ix = std::find(this->source_v_.begin(), this->source_v_.end(), @@ -46,7 +45,7 @@ namespace xo { } /*remove_source*/ void - PollingReactor::notify_source_primed(brw) { + PollingReactor::notify_source_primed(bp) { /* nothing to do here -- all sources always checked by polling loop */ } /*notify_source_primed*/ @@ -57,7 +56,7 @@ namespace xo { /* search sources [ix .. z) */ for(size_t ix = start_ix; ix < z; ++ix) { - brw src = this->source_v_[ix]; + bp src = this->source_v_[ix]; if(src->is_nonempty()) return ix; @@ -65,7 +64,7 @@ namespace xo { /* search source [0 .. ix) */ for(size_t ix = 0, n = std::min(start_ix, z); ix < n; ++ix) { - brw src = this->source_v_[ix]; + bp src = this->source_v_[ix]; if(src->is_nonempty()) return ix; @@ -86,7 +85,7 @@ namespace xo { uint64_t retval = 0; if(ix >= 0) { - brw src = this->source_v_[ix]; + bp src = this->source_v_[ix]; log && log(xtag("src.name", src->name()));