5 #if !defined(RXCPP_SOURCES_RX_CREATE_HPP) 6 #define RXCPP_SOURCES_RX_CREATE_HPP 8 #include "../rx-includes.hpp" 51 template<
class T,
class OnSubscribe>
52 struct create :
public source_base<T>
54 typedef create<T, OnSubscribe> this_type;
56 typedef rxu::decay_t<OnSubscribe> on_subscribe_type;
58 on_subscribe_type on_subscribe_function;
60 create(on_subscribe_type os)
61 : on_subscribe_function(std::move(os))
65 template<
class Subscriber>
66 void on_subscribe(Subscriber o)
const {
70 this->on_subscribe_function(o);
81 template<
class T,
class OnSubscribe>
85 detail::create<T, OnSubscribe>(std::move(os)));
auto create(OnSubscribe os) -> observable< T, detail::create< T, OnSubscribe >>
Returns an observable that executes the specified function when a subscriber subscribes to it...
Definition: rx-create.hpp:82
Definition: rx-all.hpp:26
a source of values. subscribe or use one of the operator methods that return a new observable...
Definition: rx-observable.hpp:510
auto on_exception(const F &f, const OnError &c) -> typename std::enable_if< detail::is_on_error< OnError >::value, typename detail::maybe_from_result< F >::type >::type
Definition: rx-observer.hpp:639