RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
|
Go to the documentation of this file.
5 #if !defined(RXCPP_RX_CONNECTABLE_OBSERVABLE_HPP)
6 #define RXCPP_RX_CONNECTABLE_OBSERVABLE_HPP
19 static auto check(
int) -> decltype((*(CT*)
nullptr).on_connect(composite_subscription()));
21 static not_void check(...);
23 typedef decltype(check<T>(0)) detail_result;
24 static const bool value = std::is_same<detail_result, void>::value;
34 :
public std::enable_shared_from_this<state_type>
40 std::shared_ptr<state_type> state;
49 state = std::move(o.state);
54 auto so = std::make_shared<rxu::decay_t<SO>>(std::forward<SO>(source));
56 so->on_connect(std::move(cs));
71 , state(std::make_shared<state_type>())
73 construct(std::move(sof),
77 template<
class SF,
class CF>
80 , state(std::make_shared<state_type>())
82 state->on_connect = std::forward<CF>(cf);
88 state->on_connect(std::move(cs));
92 template<
class T,
class Source>
104 template<
class T,
class SourceOperator>
112 static_assert(detail::has_on_connect<source_operator_type>::value,
"inner must have on_connect method void(composite_subscription)");
146 template<
class OperatorFactory>
147 auto op(OperatorFactory&& of)
const
148 -> decltype(of(*(
const this_type*)
nullptr)) {
167 template<
class...
AN>
178 template<
class...
AN>
195 template<
class T,
class SourceOperator,
class OperatorFactory>
197 -> decltype(source.op(std::forward<OperatorFactory>(of))) {
198 return source.op(std::forward<OperatorFactory>(of));
205 template<
class T,
class SourceOperator,
class OperatorFactory>
207 -> decltype(source.op(std::forward<OperatorFactory>(of))) {
208 return source.op(std::forward<OperatorFactory>(of));
auto AN
Definition: rx-finally.hpp:105
tag_connectable_observable observable_tag
Definition: rx-connectable_observable.hpp:112
connectable_observable(const SourceOperator &o)
Definition: rx-connectable_observable.hpp:121
connectable_observable(const connectable_observable< T, SO > &o)
Definition: rx-connectable_observable.hpp:132
typename std::decay< T >::type decay_t
Definition: rx-util.hpp:48
auto observable_member(Tag, AN &&... an) -> decltype(Overload::member(std::forward< AN >(an)...))
Definition: rx-operators.hpp:63
connectable_observable< T > make_dynamic_connectable_observable(Source &&s)
Definition: rx-connectable_observable.hpp:93
dynamic_connectable_observable()
Definition: rx-connectable_observable.hpp:64
Definition: rx-predef.hpp:128
Definition: rx-predef.hpp:126
Definition: rx-operators.hpp:309
connectable_observable(SourceOperator &&o)
Definition: rx-connectable_observable.hpp:125
Definition: rx-sources.hpp:15
connectable_observable(connectable_observable< T, SO > &&o)
Definition: rx-connectable_observable.hpp:137
a source of values that is shared across all subscribers and does not start until connectable_observa...
Definition: rx-connectable_observable.hpp:105
void on_connect(composite_subscription cs) const
Definition: rx-connectable_observable.hpp:87
dynamic_connectable_observable(SF &&sf, CF &&cf)
Definition: rx-connectable_observable.hpp:78
auto op(OperatorFactory &&of) const -> decltype(of(*(const this_type *) nullptr))
Definition: rx-connectable_observable.hpp:147
auto ref_count(AN... an) const
Definition: rx-connectable_observable.hpp:168
Definition: rx-observable.hpp:36
auto operator|(const rxcpp::connectable_observable< T, SourceOperator > &source, OperatorFactory &&of) -> decltype(source.op(std::forward< OperatorFactory >(of)))
Definition: rx-connectable_observable.hpp:206
dynamic_connectable_observable(SOF sof)
Definition: rx-connectable_observable.hpp:69
Definition: rx-operators.hpp:171
Definition: rx-connectable_observable.hpp:30
auto operator>>(const rxcpp::connectable_observable< T, SourceOperator > &source, OperatorFactory &&of) -> decltype(source.op(std::forward< OperatorFactory >(of)))
Definition: rx-connectable_observable.hpp:196
auto connect_forever(AN... an) const
Definition: rx-connectable_observable.hpp:179
connectable_observable()
Definition: rx-connectable_observable.hpp:117
Definition: rx-predef.hpp:270
connectable_observable< T > as_dynamic()
Definition: rx-connectable_observable.hpp:156
composite_subscription connect(composite_subscription cs=composite_subscription())
Definition: rx-connectable_observable.hpp:160
source_operator_type source_operator
Definition: rx-observable.hpp:487
controls lifetime for scheduler::schedule and observable<T, SourceOperator>::subscribe.
Definition: rx-subscription.hpp:459
a source of values. subscribe or use one of the operator methods that return a new observable,...
Definition: rx-observable.hpp:478
Definition: rx-predef.hpp:220
Definition: rx-all.hpp:26
tag_dynamic_observable dynamic_observable_tag
Definition: rx-connectable_observable.hpp:62