xo-reactor: bugfix: xo::ref::rp -> xo::rp
This commit is contained in:
parent
aa40c8ac75
commit
e3a53d10e6
5 changed files with 12 additions and 12 deletions
|
|
@ -13,7 +13,7 @@ namespace xo {
|
|||
LastReducer<Event,
|
||||
StructEventTimeFn<Event>>>;
|
||||
|
||||
/* use when Event is ref::rp<T> for some T */
|
||||
/* use when Event is rp<T> for some T */
|
||||
template<typename Event>
|
||||
using DirectSourcePtr = SecondarySource<Event,
|
||||
LastReducer<Event,
|
||||
|
|
|
|||
|
|
@ -38,17 +38,17 @@ namespace xo {
|
|||
* 2. provide .last_n(), .last_dt()
|
||||
*/
|
||||
|
||||
virtual void http_snapshot(ref::rp<PrintJson> const & pjson,
|
||||
virtual void http_snapshot(rp<PrintJson> const & pjson,
|
||||
std::ostream * p_os) const = 0;
|
||||
|
||||
/* http endpoint; generates http output for this eventstore */
|
||||
virtual HttpEndpointDescr http_endpoint_descr(ref::rp<PrintJson> const & pjson,
|
||||
virtual HttpEndpointDescr http_endpoint_descr(rp<PrintJson> const & pjson,
|
||||
std::string const & url_prefix) const {
|
||||
|
||||
/* important that lambda contains its own rp<PrintJson>;
|
||||
* reference to stack will not do
|
||||
*/
|
||||
ref::rp<PrintJson> pjson_rp = pjson;
|
||||
rp<PrintJson> pjson_rp = pjson;
|
||||
|
||||
auto http_fn = ([this, pjson_rp]
|
||||
(std::string const & /*uri*/,
|
||||
|
|
@ -118,7 +118,7 @@ namespace xo {
|
|||
using Alist = xo::web::Alist;
|
||||
using HttpEndpointDescr = xo::web::HttpEndpointDescr;
|
||||
|
||||
static ref::rp<EventStoreImpl> make() { return new EventStoreImpl(); }
|
||||
static rp<EventStoreImpl> make() { return new EventStoreImpl(); }
|
||||
|
||||
/* visit most recent n events in this store.
|
||||
* returns #of events actually visited
|
||||
|
|
@ -206,7 +206,7 @@ namespace xo {
|
|||
virtual std::uint32_t size() const override { return tree_.size(); }
|
||||
|
||||
/* write http snapshot of current state to *p_os */
|
||||
virtual void http_snapshot(ref::rp<PrintJson> const & pjson, std::ostream * p_os) const override {
|
||||
virtual void http_snapshot(rp<PrintJson> const & pjson, std::ostream * p_os) const override {
|
||||
using xo::reflect::Reflect;
|
||||
|
||||
/* visit last 100 events;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace xo {
|
|||
public:
|
||||
~SecondarySource() = default;
|
||||
|
||||
static ref::rp<SecondarySource> make() { return new SecondarySource(); }
|
||||
static rp<SecondarySource> make() { return new SecondarySource(); }
|
||||
|
||||
/* last event delivered from this source --
|
||||
* i.e. event in most recent call to .deliver_one_aux()
|
||||
|
|
@ -114,7 +114,7 @@ namespace xo {
|
|||
|
||||
// ----- inherited from EventSource -----
|
||||
|
||||
virtual CallbackId add_callback(ref::rp<EventSink> const & cb) override {
|
||||
virtual CallbackId add_callback(rp<EventSink> const & cb) override {
|
||||
return this->cb_set_.add_callback(cb);
|
||||
} /*add_callback*/
|
||||
|
||||
|
|
@ -195,8 +195,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<AbstractSink> const & sink) override {
|
||||
ref::rp<EventSink> native_sink
|
||||
virtual CallbackId attach_sink(rp<AbstractSink> const & sink) override {
|
||||
rp<EventSink> native_sink
|
||||
= EventSink::require_native("SecondarySource::attach_sink", sink);
|
||||
|
||||
if (native_sink) {
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ namespace xo {
|
|||
#ifdef NOT_USING
|
||||
class TemporaryTest {
|
||||
public:
|
||||
static ref::rp<SinkToConsole<std::pair<xo::time::utc_nanos, double>>> realization_printer();
|
||||
static rp<SinkToConsole<std::pair<xo::time::utc_nanos, double>>> realization_printer();
|
||||
}; /*TemporaryTest*/
|
||||
#endif
|
||||
} /*namespace reactor*/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
namespace xo {
|
||||
namespace reactor {
|
||||
#ifdef NOT_USING
|
||||
ref::rp<SinkToConsole<std::pair<xo::time::utc_nanos, double>>>
|
||||
rp<SinkToConsole<std::pair<xo::time::utc_nanos, double>>>
|
||||
TemporaryTest::realization_printer()
|
||||
{
|
||||
return new SinkToConsole<std::pair<xo::time::utc_nanos, double>>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue