5 #if !defined(RXCPP_RX_PREDEF_HPP) 6 #define RXCPP_RX_PREDEF_HPP 22 template<
class T,
class C = rxu::types_checked>
26 struct is_action<T, typename rxu::types_checked_from<typename T::action_tag>::type>
27 :
public std::is_convertible<typename T::action_tag*, tag_action*> {};
36 static typename C::worker_tag* check(
int);
38 static not_void check(...);
40 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_worker*>::value;
49 static typename C::scheduler_tag* check(
int);
51 static not_void check(...);
53 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_scheduler*>::value;
62 static typename C::schedulable_tag* check(
int);
64 static not_void check(...);
66 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_schedulable*>::value;
72 struct stateless_observer_tag {};
77 template<
class T,
class State =
void,
class OnNext =
void,
class OnError =
void,
class OnCompleted =
void>
81 template<
class T,
class OnNext,
class OnError,
class OnCompleted>
82 class observer<T, detail::stateless_observer_tag, OnNext, OnError, OnCompleted>;
86 class
observer<T, void, void, void, void>;
93 static typename C::observer_tag* check(
int);
95 static void check(...);
97 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_observer*>::value;
106 static typename C::dynamic_observer_tag* check(
int);
108 static not_void check(...);
110 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_dynamic_observer*>::value;
119 static typename C::subscriber_tag* check(
int);
121 static not_void check(...);
123 static const bool value = std::is_convertible<decltype(check<rxu::decay_t<T>>(0)),
tag_subscriber*>::value;
132 static typename C::dynamic_observable_tag* check(
int);
134 static not_void check(...);
144 class SourceObservable =
typename std::conditional<std::is_same<T, void>::value,
148 template<
class T,
class Source>
151 template<
class Selector,
class Default,
template<
class... TN>
class SO, class...
AN>
163 template<
class T,
class =rxu::types_checked>
170 : std::is_convertible<typename T::observable_tag*, tag_observable*>
176 template<
class T,
class Decayed = rxu::decay_t<T>>
181 template<
class Observable,
class DecayedObservable = rxu::decay_t<Observable>>
185 template<
class Types,
class =rxu::types_checked>
187 template<
class... ObservableN>
192 template<
class... ObservableN>
195 template<
class... ObservableN>
205 static typename C::dynamic_observable_tag* check(
int);
207 static not_void check(...);
216 class SourceObservable =
typename std::conditional<std::is_same<T, void>::value,
225 static typename C::observable_tag check(
int);
227 static void check(...);
239 static typename C::dynamic_observable_tag* check(
int);
241 static not_void check(...);
246 template<
class K,
class T>
249 template<
class K,
class T,
250 class SourceObservable =
typename std::conditional<std::is_same<T, void>::value,
254 template<
class K,
class T,
class Source>
262 static typename C::observable_tag check(
int);
264 static void check(...);
269 template<
class Source,
class Function>
276 struct tag_not_valid;
277 template<
class CS,
class CO>
278 static auto check(
int) -> decltype((*(CS*)
nullptr)((*(CO*)
nullptr)));
279 template<
class CS,
class CO>
280 static tag_not_valid check(...);
282 using type = decltype(check<function_type, source_type>(0));
293 template<
class Observable>
309 template<
class T,
class Seed,
class Accumulator>
317 template<
class CS,
class CV,
class CRS>
318 static auto check(
int) -> decltype((*(CRS*)
nullptr)(*(CS*)
nullptr, *(CV*)
nullptr));
319 template<
class CS,
class CV,
class CRS>
322 typedef decltype(check<seed_type, source_value_type, accumulator_type>(0)) type;
323 static const
bool value = std::is_same<type, seed_type>::value;
Definition: rx-predef.hpp:220
Definition: rx-grouped_observable.hpp:30
Definition: rx-predef.hpp:88
Definition: rx-util.hpp:100
a source of values that is shared across all subscribers and does not start until connectable_observa...
Definition: rx-connectable_observable.hpp:105
a source of observables which each emit values from one category specified by the key selector...
Definition: rx-grouped_observable.hpp:121
Definition: rx-observable.hpp:157
Definition: rx-all.hpp:26
Definition: rx-predef.hpp:302
Definition: rx-predef.hpp:23
typename expand_observable_tags< rxu::types< ObservableN... >>::type observable_tags_t
Definition: rx-predef.hpp:193
Definition: rx-predef.hpp:113
auto AN
Definition: rx-finally.hpp:105
Definition: rx-predef.hpp:222
Definition: rx-predef.hpp:156
Definition: rx-predef.hpp:201
tag_observable observable_tag
Definition: rx-predef.hpp:157
Definition: rx-predef.hpp:291
typename std::decay< T >::type decay_t
Definition: rx-util.hpp:36
Definition: rx-predef.hpp:100
auto operator()(Observable o) -> Observable
Definition: rx-predef.hpp:294
auto rxcpp_trace_activity(...) -> rxcpp::trace_noop
Definition: rx-predef.hpp:232
rxu::decay_t< Source > source_type
Definition: rx-predef.hpp:272
Definition: rx-predef.hpp:21
rxu::decay_t< Function > function_type
Definition: rx-predef.hpp:271
Definition: rx-predef.hpp:30
Definition: rx-predef.hpp:316
Definition: rx-observable.hpp:36
Definition: rx-predef.hpp:235
T value_type
Definition: rx-predef.hpp:158
grouped_observable< K, T > make_dynamic_grouped_observable(Source &&s)
Definition: rx-grouped_observable.hpp:108
observable< T > make_observable_dynamic(Source &&s)
Definition: rx-observable.hpp:102
Definition: rx-predef.hpp:58
typename DecayedObservable::observable_tag observable_tag_t
Definition: rx-predef.hpp:182
a source of values. subscribe or use one of the operator methods that return a new observable...
Definition: rx-observable.hpp:510
Definition: rx-util.hpp:147
Definition: rx-predef.hpp:32
auto trace_activity() -> decltype(rxcpp_trace_activity(trace_tag()))&
Definition: rx-predef.hpp:15
Definition: rx-predef.hpp:198
rxu::decay_t< Accumulator > accumulator_type
Definition: rx-predef.hpp:312
Definition: rx-connectable_observable.hpp:30
Definition: rx-predef.hpp:154
Definition: rx-predef.hpp:257
Definition: rx-predef.hpp:270
Definition: rx-predef.hpp:310
typename types_checked_from< TN... >::type types_checked_t
Definition: rx-util.hpp:164
Definition: rx-trace.hpp:107
consumes values from an observable using State that may implement on_next, on_error and on_completed ...
Definition: rx-observer.hpp:179
T source_value_type
Definition: rx-predef.hpp:314
Definition: rx-predef.hpp:56
decltype(check< function_type, source_type >(0)) type
Definition: rx-predef.hpp:282
Definition: rx-predef.hpp:128
Definition: rx-predef.hpp:90
rxu::decay_t< Seed > seed_type
Definition: rx-predef.hpp:313
Definition: rx-predef.hpp:102
Definition: rx-predef.hpp:115
Definition: rx-predef.hpp:43
Definition: rx-predef.hpp:259
Definition: rx-predef.hpp:126
Definition: rx-predef.hpp:45
T operator()(T t)
Definition: rx-predef.hpp:304
Definition: rx-predef.hpp:177