diff --git a/include/xo/reactor/AbstractEventProcessor.hpp b/include/xo/reactor/AbstractEventProcessor.hpp index 820ab0ae..aa04a1c8 100644 --- a/include/xo/reactor/AbstractEventProcessor.hpp +++ b/include/xo/reactor/AbstractEventProcessor.hpp @@ -25,7 +25,7 @@ namespace xo { /* find all event processors ep reachable from x (i.e. downstream from x). * report each such ep exactly once */ - static std::vector> map_network(ref::rp const & x); + static std::vector> map_network(rp const & x); /* visit direct downstream consumers c[i] of this event processor. * call ep(c[i]) for each such consumer. diff --git a/include/xo/reactor/AbstractSink.hpp b/include/xo/reactor/AbstractSink.hpp index e855eda8..46e2bf0b 100644 --- a/include/xo/reactor/AbstractSink.hpp +++ b/include/xo/reactor/AbstractSink.hpp @@ -59,7 +59,7 @@ namespace xo { * with a function thats calls a .notify_xxx() method * on this Sink */ - virtual void attach_source(ref::rp const & src) = 0; + virtual void attach_source(rp const & src) = 0; /* accept incoming event, given by tagged pointer */ virtual void notify_ev_tp(TaggedPtr const & ev_tp) = 0; diff --git a/include/xo/reactor/AbstractSource.hpp b/include/xo/reactor/AbstractSource.hpp index 4d995ab2..d98938ed 100644 --- a/include/xo/reactor/AbstractSource.hpp +++ b/include/xo/reactor/AbstractSource.hpp @@ -64,7 +64,7 @@ namespace xo { /* set .trace_sim_flag */ virtual void set_debug_sim_flag(bool x) = 0; - virtual CallbackId attach_sink(ref::rp const & sink) = 0; + virtual CallbackId attach_sink(rp const & sink) = 0; virtual void detach_sink(CallbackId id) = 0; /* endpoint for a websocket subscriber; @@ -92,7 +92,7 @@ namespace xo { std::uint64_t deliver_all(); }; /*AbstractSource*/ - using AbstractSourcePtr = ref::rp; + using AbstractSourcePtr = rp; } /*namespace reactor*/ } /*namespace xo*/ diff --git a/include/xo/reactor/EventSource.hpp b/include/xo/reactor/EventSource.hpp index 055c7d6b..bb08eca9 100644 --- a/include/xo/reactor/EventSource.hpp +++ b/include/xo/reactor/EventSource.hpp @@ -15,7 +15,7 @@ namespace xo { using CallbackId = fn::CallbackId; public: - virtual CallbackId add_callback(ref::rp const & cb) = 0; + virtual CallbackId add_callback(rp const & cb) = 0; virtual void remove_callback(CallbackId id) = 0; }; /*EventSource*/ diff --git a/include/xo/reactor/EventTimeFn2.hpp b/include/xo/reactor/EventTimeFn2.hpp index 6d2b0170..9f68eb00 100644 --- a/include/xo/reactor/EventTimeFn2.hpp +++ b/include/xo/reactor/EventTimeFn2.hpp @@ -20,10 +20,10 @@ namespace xo { }; template - class EventTimeFn> { + class EventTimeFn> { public: using utc_nanos = xo::time::utc_nanos; - using event_t = xo::ref::rp; + using event_t = xo::rp; public: static utc_nanos event_tm(event_t const & ev) { return ev->tm(); } diff --git a/include/xo/reactor/FifoQueue.hpp b/include/xo/reactor/FifoQueue.hpp index 175836b3..1d1439d2 100644 --- a/include/xo/reactor/FifoQueue.hpp +++ b/include/xo/reactor/FifoQueue.hpp @@ -29,7 +29,7 @@ namespace xo { using utc_nanos = xo::time::utc_nanos; public: - static ref::rp make(EvTimeFn evtm_fn = EvTimeFn()) { return new FifoQueue(evtm_fn); } + static rp make(EvTimeFn evtm_fn = EvTimeFn()) { return new FifoQueue(evtm_fn); } // ----- inherited from Sink1 ----- @@ -141,8 +141,8 @@ namespace xo { virtual bool debug_sim_flag() const override { return debug_sim_flag_; } virtual void set_debug_sim_flag(bool x) override { this->debug_sim_flag_ = x; } - virtual CallbackId attach_sink(ref::rp const & sink) override { - ref::rp native_sink + virtual CallbackId attach_sink(rp const & sink) override { + rp native_sink = EventSink::require_native("FifoQueue::attach_sink", sink); if (native_sink) { @@ -168,7 +168,7 @@ namespace xo { // ----- inherited from EventSource ----- - virtual CallbackId add_callback(ref::rp const & cb) override { + virtual CallbackId add_callback(rp const & cb) override { return this->cb_set_.add_callback(cb); } diff --git a/include/xo/reactor/PollingReactor.hpp b/include/xo/reactor/PollingReactor.hpp index 8cbe2c2f..be4dd028 100644 --- a/include/xo/reactor/PollingReactor.hpp +++ b/include/xo/reactor/PollingReactor.hpp @@ -13,7 +13,7 @@ namespace xo { class PollingReactor : public Reactor { public: /* named ctor idiom */ - static ref::rp make() { return new PollingReactor(); } + static rp make() { return new PollingReactor(); } // ----- inherited from Reactor ----- diff --git a/include/xo/reactor/PolyAdapterSink.hpp b/include/xo/reactor/PolyAdapterSink.hpp index 60ec4ccf..e5e56c69 100644 --- a/include/xo/reactor/PolyAdapterSink.hpp +++ b/include/xo/reactor/PolyAdapterSink.hpp @@ -29,10 +29,10 @@ namespace xo { public: /* named ctor idiom */ - static ref::rp make(ref::rp poly_sink) { + static rp make(rp poly_sink) { //xo::scope lscope("PolyAdapterSink::make"); - ref::rp retval(new PolyAdapterSink(poly_sink)); + rp retval(new PolyAdapterSink(poly_sink)); //lscope.log("adapter", (void*)retval.get()); @@ -80,11 +80,11 @@ namespace xo { } /*display*/ private: - PolyAdapterSink(ref::rp poly_sink) : poly_sink_{std::move(poly_sink)} {} + PolyAdapterSink(rp poly_sink) : poly_sink_{std::move(poly_sink)} {} private: /* mandate: .poly_sink.allow_polymorphic_source() is true */ - ref::rp poly_sink_; + rp poly_sink_; }; /*PolyAdapterSink*/ } /*namespace reactor*/ } /*namespace xo*/ diff --git a/include/xo/reactor/ReactorSource.hpp b/include/xo/reactor/ReactorSource.hpp index 8b217a4b..bdcc9db4 100644 --- a/include/xo/reactor/ReactorSource.hpp +++ b/include/xo/reactor/ReactorSource.hpp @@ -123,7 +123,7 @@ namespace xo { uint64_t online_advance_until(utc_nanos tm, bool replay_flag); }; /*ReactorSource*/ - using ReactorSourcePtr = ref::rp; + using ReactorSourcePtr = rp; } /*namespace reactor*/ } /*namespace xo*/ diff --git a/include/xo/reactor/Sink.hpp b/include/xo/reactor/Sink.hpp index 51d71268..dab326f9 100644 --- a/include/xo/reactor/Sink.hpp +++ b/include/xo/reactor/Sink.hpp @@ -40,8 +40,8 @@ namespace xo { /* convenience: convert abstract sink to Sink1*, * or throw */ - static ref::rp> require_native(std::string_view caller, - ref::rp const & sink) + static rp> require_native(std::string_view caller, + rp const & sink) { using xo::scope; using xo::xtag; @@ -112,7 +112,7 @@ namespace xo { /* Sink1 only allows source providing T */ virtual bool allow_polymorphic_source() const override { return false; } - virtual void attach_source(ref::rp const & src) override { + virtual void attach_source(rp const & src) override { src->attach_sink(this); } /*attach_source*/ diff --git a/src/reactor/AbstractEventProcessor.cpp b/src/reactor/AbstractEventProcessor.cpp index 4b1bcc52..55939ab1 100644 --- a/src/reactor/AbstractEventProcessor.cpp +++ b/src/reactor/AbstractEventProcessor.cpp @@ -6,7 +6,6 @@ #include namespace xo { - using ref::rp; using ref::brw; using xo::tostr; using std::uint32_t; diff --git a/src/reactor/AbstractSource.cpp b/src/reactor/AbstractSource.cpp index 973ec4c6..bbad859d 100644 --- a/src/reactor/AbstractSource.cpp +++ b/src/reactor/AbstractSource.cpp @@ -8,9 +8,6 @@ namespace xo { using xo::web::StreamEndpointDescr; using xo::reactor::AbstractSink; - using xo::ref::rp; - //using xo::scope; - //using xo::tostr; namespace reactor { StreamEndpointDescr diff --git a/utest/PollingReactor.test.cpp b/utest/PollingReactor.test.cpp index 106acaf6..bcdf861f 100644 --- a/utest/PollingReactor.test.cpp +++ b/utest/PollingReactor.test.cpp @@ -13,7 +13,6 @@ namespace xo { using xo::reactor::PollingReactor; using xo::reactor::FifoQueue; using xo::reactor::SinkToFunction; - using xo::ref::rp; using xo::time::timeutil; using xo::time::seconds; using xo::time::utc_nanos; diff --git a/utest/Sink.test.cpp b/utest/Sink.test.cpp index 160530a0..524b821e 100644 --- a/utest/Sink.test.cpp +++ b/utest/Sink.test.cpp @@ -13,7 +13,6 @@ namespace xo { using xo::reactor::SinkEndpoint; using xo::reactor::SinkToConsole; using xo::time::utc_nanos; - using xo::ref::rp; namespace { class TestSink : public SinkEndpoint {