53 #if !defined(RXCPP_OPERATORS_RX_SUBSCRIBE_HPP) 54 #define RXCPP_OPERATORS_RX_SUBSCRIBE_HPP 56 #include "../rx-includes.hpp" 64 template<
class Subscriber>
65 class subscribe_factory;
67 template<
class T,
class I>
68 class subscribe_factory<subscriber<T, I>>
70 subscriber<T, I> scrbr;
72 subscribe_factory(subscriber<T, I> s)
75 template<
class Observable>
76 auto operator()(Observable&& source)
77 -> decltype(std::forward<Observable>(source).
subscribe(std::move(scrbr))) {
78 return std::forward<Observable>(source).
subscribe(std::move(scrbr));
86 template<
class T,
class... ArgN>
88 -> detail::subscribe_factory<decltype (make_subscriber<T>(std::forward<ArgN>(an)...))> {
89 return detail::subscribe_factory<decltype (make_subscriber<T>(std::forward<ArgN>(an)...))>
90 (make_subscriber<T>(std::forward<ArgN>(an)...));
98 template<
class Observable>
99 auto operator()(Observable&& source)
118 -> detail::dynamic_factory {
119 return detail::dynamic_factory();
124 class blocking_factory
127 template<
class Observable>
128 auto operator()(Observable&& source)
129 -> decltype(std::forward<Observable>(source).
as_blocking()) {
130 return std::forward<Observable>(source).
as_blocking();
145 -> detail::blocking_factory {
146 return detail::blocking_factory();
Definition: rx-all.hpp:26
auto as_blocking() -> detail::blocking_factory
Definition: rx-subscribe.hpp:144
a source of values. subscribe or use one of the operator methods that return a new observable...
Definition: rx-observable.hpp:510
auto as_dynamic() -> detail::dynamic_factory
Definition: rx-subscribe.hpp:117
auto subscribe(ArgN &&...an) -> detail::subscribe_factory< decltype(make_subscriber< T >(std::forward< ArgN >(an)...))>
Subscribe will cause the source observable to emit values to the provided subscriber.
Definition: rx-subscribe.hpp:87