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_INCLUDES_HPP)
6 #define RXCPP_RX_INCLUDES_HPP
14 #pragma warning(disable: 4348) // false positives on : redefinition of default parameter : parameter 2
15 #define RXCPP_USE_RVALUEREF 1
19 #define RXCPP_USE_VARIADIC_TEMPLATES 1
23 #define RXCPP_USE_RTTI 1
27 #define RXCPP_USE_EXCEPTIONS 1
30 #define RXCPP_NORETURN __declspec(noreturn)
32 #elif defined(__clang__)
34 #if __has_feature(cxx_rvalue_references)
35 #define RXCPP_USE_RVALUEREF 1
37 #if __has_feature(cxx_rtti)
38 #define RXCPP_USE_RTTI 1
40 #if __has_feature(cxx_variadic_templates)
41 #define RXCPP_USE_VARIADIC_TEMPLATES 1
43 #if __has_feature(cxx_exceptions)
44 #define RXCPP_USE_EXCEPTIONS 1
47 #if __has_feature(cxx_attributes)
48 #define RXCPP_NORETURN [[noreturn]]
50 #define RXCPP_NORETURN __attribute__ ((noreturn))
53 #elif defined(__GNUG__)
55 #define GCC_VERSION (__GNUC__ * 10000 + \
56 __GNUC_MINOR__ * 100 + \
59 #if GCC_VERSION >= 40801
60 #define RXCPP_USE_RVALUEREF 1
63 #if GCC_VERSION >= 40400
64 #define RXCPP_USE_VARIADIC_TEMPLATES 1
67 #if defined(__GXX_RTTI)
68 #define RXCPP_USE_RTTI 1
71 #if defined(__EXCEPTIONS)
72 #define RXCPP_USE_EXCEPTIONS 1
75 #define RXCPP_NORETURN __attribute__ ((noreturn))
84 #define RXCPP_HASH_ENUM 0
85 #define RXCPP_HASH_ENUM_UNDERLYING 1
87 #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
88 #define RXCPP_USE_WINRT 0
90 #define RXCPP_USE_WINRT 1
93 #if defined(__APPLE__) && defined(__MACH__)
94 #include <TargetConditionals.h>
95 #if (TARGET_OS_IPHONE == 1) || (TARGET_IPHONE_SIMULATOR == 1)
100 #if defined(__ANDROID__)
101 #define RXCPP_ON_ANDROID
104 #if defined(RXCPP_FORCE_USE_VARIADIC_TEMPLATES)
105 #undef RXCPP_USE_VARIADIC_TEMPLATES
106 #define RXCPP_USE_VARIADIC_TEMPLATES RXCPP_FORCE_USE_VARIADIC_TEMPLATES
109 #if defined(RXCPP_FORCE_USE_RVALUEREF)
110 #undef RXCPP_USE_RVALUEREF
111 #define RXCPP_USE_RVALUEREF RXCPP_FORCE_USE_RVALUEREF
114 #if defined(RXCPP_FORCE_USE_RTTI)
115 #undef RXCPP_USE_RTTI
116 #define RXCPP_USE_RTTI RXCPP_FORCE_USE_RTTI
119 #if defined(RXCPP_FORCE_USE_EXCEPTIONS)
120 #undef RXCPP_USE_EXCEPTIONS
121 #define RXCPP_USE_EXCEPTIONS RXCPP_FORCE_USE_EXCEPTIONS
124 #if defined(RXCPP_FORCE_USE_WINRT)
125 #undef RXCPP_USE_WINRT
126 #define RXCPP_USE_WINRT RXCPP_FORCE_USE_WINRT
129 #if defined(RXCPP_FORCE_HASH_ENUM)
130 #undef RXCPP_HASH_ENUM
131 #define RXCPP_HASH_ENUM RXCPP_FORCE_HASH_ENUM
134 #if defined(RXCPP_FORCE_HASH_ENUM_UNDERLYING)
135 #undef RXCPP_HASH_ENUM_UNDERLYING
136 #define RXCPP_HASH_ENUM_UNDERLYING RXCPP_FORCE_HASH_ENUM_UNDERLYING
139 #if defined(RXCPP_FORCE_ON_IOS)
141 #define RXCPP_ON_IOS RXCPP_FORCE_ON_IOS
144 #if defined(RXCPP_FORCE_ON_ANDROID)
145 #undef RXCPP_ON_ANDROID
146 #define RXCPP_ON_ANDROID RXCPP_FORCE_ON_ANDROID
149 #if defined(_MSC_VER) && !RXCPP_USE_VARIADIC_TEMPLATES
151 #define _VARIADIC_MAX 10
154 #if defined(_MSC_VER) && (_MSC_VER <= 1800)
155 #define RXCPP_NOEXCEPT
157 #define RXCPP_NOEXCEPT noexcept
160 #pragma push_macro("min")
161 #pragma push_macro("max")
173 #include <functional>
188 #include <condition_variable>
189 #include <initializer_list>
192 #include <unordered_set>
193 #include <type_traits>
196 #if defined(RXCPP_ON_IOS) || defined(RXCPP_ON_ANDROID)
215 #if !defined(RXCPP_LITE)
273 #pragma pop_macro("min")
274 #pragma pop_macro("max")
Discards the first items fulfilling the predicate from this observable emit them from the new observa...
Return an observable that emits connected, non-overlapping buffers of items from the source observabl...
Start with the supplied values, then concatenate this observable.
For each item from this observable, filter out consequentially repeated values and emit only changes ...
Take values pairwise from this observable.
Make new observable with skipped first count items from this observable.
Return an observable that emits observables every period time interval and collects items from this o...
For each item from this observable until on_next occurs on the trigger observable or until the specif...
For each given observable subscribe. For each item emitted from all of the given observables,...
If an error occurs, take the result from the Selector and subscribe to that instead.
For each item from only the first of the given observables deliver from the new observable that is re...
Make new observable with items skipped until on_next occurs on the trigger observable or until the sp...
1) replay(optional Coordination, optional CompositeSubscription) Turn a cold observable hot,...
If the source Observable terminates without emitting any items, emits items from a backup Observable.
Add a new action at the end of the new observable that is returned.
Return observable that emits the items emitted by the observable most recently emitted by the source ...
For each item from this observable use the CollectionSelector to produce an observable and subscribe ...
Subscription and unsubscription are queued and delivered using the scheduler from the supplied coordi...
Returns an observable that attaches a timestamp to each item emitted by the source observable indicat...
For the first items fulfilling the predicate from this observable emit them from the new observable t...
Determine whether two Observables emit the same sequence of items.
Return an Observable that emits the most recent items emitted by the source Observable within periodi...
Return an observable that terminates with timeout_error if a particular timespan has passed without e...
Returns an Observable that emits true if every item emitted by the source Observable satisfies a spec...
For each item from all of the observables select a value to emit from the new observable that is retu...
For each item from this observable use Predicate to select which items to emit from the new observabl...
takes a connectable_observable source and calls connect during the construction of the expression....
For each item from this observable, filter out repeated values and emit only items that have not alre...
Return an observable that emits observables every period time interval and collects items from this o...
Return an observable that emits grouped_observables, each of which corresponds to a unique key value ...
Emit only the final t items emitted by the source Observable.
Do not emit any items from the source Observable, but allow termination notification (either onError ...
Returns an observable that emits indications of the amount of time lapsed between consecutive emissio...
Bring by one item from all given observables and select a value to emit from the new observable that ...
Return an observable that emits connected, non-overlapping windows of items from the source observabl...
Retry this observable for the given number of times.
All values are queued and delivered using the scheduler from the supplied coordination.
inspect calls to on_next, on_error and on_completed.
Return an observable that emits connected, non-overlapping windows, each containing at most count ite...
Return an observable that emits connected, non-overlapping buffer, each containing at most count item...
For each item from this observable use Selector to produce an item to emit from the new observable th...
Repeat this observable for the given number of times or infinitely.
For each item from this observable use the CollectionSelector to produce an observable and subscribe ...
For each item from this observable use Accumulator to combine items into a value that will be emitted...
Return an observable that emits buffers every period time interval and collects items from this obser...
Pulls an item located at a specified index location in the sequence of items and emits that item as i...
Make new observable with skipped last count items from this observable.
Return an observable that emits each item emitted by the source observable after the specified delay.
For each item from this observable use Accumulator to combine items, when completed use ResultSelecto...
Return an observable that emits an item if a particular timespan has passed without emitting another ...
Returns an Observable that emits true if any item emitted by the source Observable satisfies a specif...
For each item from the first observable select the latest value from all the observables to emit from...
For each item from this observable subscribe to one at a time, in the order received....
For the first count items from this observable emit them from the new observable that is returned.