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++.
|
Classes | |
class | is_source |
struct | source_base |
struct | tag_source |
Functions | |
template<class T , class OnSubscribe > | |
auto | create (OnSubscribe os) -> observable< T, detail::create< T, OnSubscribe >> |
Returns an observable that executes the specified function when a subscriber subscribes to it. More... | |
template<class ObservableFactory > | |
auto | defer (ObservableFactory of) -> observable< rxu::value_type_t< detail::defer_traits< ObservableFactory >>, detail::defer< ObservableFactory >> |
Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes. More... | |
template<class T > | |
auto | empty () -> decltype(from< T >()) |
Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. More... | |
template<class T , class Coordination > | |
auto | empty (Coordination cn) -> decltype(from< T >(std::move(cn))) |
Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. More... | |
template<class T , class E > | |
auto | error (E e) -> decltype(detail::make_error< T >(typename std::conditional< std::is_same< std::exception_ptr, rxu::decay_t< E >>::value, detail::throw_ptr_tag, detail::throw_instance_tag >::type(), std::move(e), identity_immediate())) |
Returns an observable that sends no items to observer and immediately generates an error, on the specified scheduler. More... | |
template<class T , class E , class Coordination > | |
auto | error (E e, Coordination cn) -> decltype(detail::make_error< T >(typename std::conditional< std::is_same< std::exception_ptr, rxu::decay_t< E >>::value, detail::throw_ptr_tag, detail::throw_instance_tag >::type(), std::move(e), std::move(cn))) |
Returns an observable that sends no items to observer and immediately generates an error, on the specified scheduler. More... | |
template<class Duration > | |
auto | interval (Duration period) -> typename std::enable_if< detail::defer_interval< Duration, identity_one_worker >::value, typename detail::defer_interval< Duration, identity_one_worker >::observable_type >::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More... | |
template<class Coordination > | |
auto | interval (rxsc::scheduler::clock_type::duration period, Coordination cn) -> typename std::enable_if< detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::value, typename detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::observable_type >::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More... | |
template<class Duration > | |
auto | interval (rxsc::scheduler::clock_type::time_point when, Duration period) -> typename std::enable_if< detail::defer_interval< Duration, identity_one_worker >::value, typename detail::defer_interval< Duration, identity_one_worker >::observable_type >::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More... | |
template<class Coordination > | |
auto | interval (rxsc::scheduler::clock_type::time_point when, rxsc::scheduler::clock_type::duration period, Coordination cn) -> typename std::enable_if< detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::value, typename detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::observable_type >::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More... | |
template<class Collection > | |
auto | iterate (Collection c) -> observable< rxu::value_type_t< detail::iterate_traits< Collection >>, detail::iterate< Collection, identity_one_worker >> |
Returns an observable that sends each value in the collection, on the specified scheduler. More... | |
template<class Collection , class Coordination > | |
auto | iterate (Collection c, Coordination cn) -> observable< rxu::value_type_t< detail::iterate_traits< Collection >>, detail::iterate< Collection, Coordination >> |
Returns an observable that sends each value in the collection, on the specified scheduler. More... | |
template<class T > | |
auto | from () -> decltype(iterate(std::array< T, 0 >(), identity_immediate())) |
template<class T , class Coordination > | |
auto | from (Coordination cn) -> typename std::enable_if< is_coordination< Coordination >::value, decltype( iterate(std::array< T, 0 >(), std::move(cn)))>::type |
template<class Value0 , class... ValueN> | |
auto | from (Value0 v0, ValueN...vn) -> typename std::enable_if<!is_coordination< Value0 >::value, decltype(iterate(*(std::array< Value0, sizeof...(ValueN)+1 > *) nullptr, identity_immediate()))>::type |
template<class Coordination , class Value0 , class... ValueN> | |
auto | from (Coordination cn, Value0 v0, ValueN...vn) -> typename std::enable_if< is_coordination< Coordination >::value, decltype(iterate(*(std::array< Value0, sizeof...(ValueN)+1 > *) nullptr, std::move(cn)))>::type |
template<class Value0 > | |
auto | just (Value0 v0) -> typename std::enable_if<!is_coordination< Value0 >::value, decltype(iterate(*(std::array< Value0, 1 > *) nullptr, identity_immediate()))>::type |
template<class Value0 , class Coordination > | |
auto | just (Value0 v0, Coordination cn) -> typename std::enable_if< is_coordination< Coordination >::value, decltype(iterate(*(std::array< Value0, 1 > *) nullptr, std::move(cn)))>::type |
template<class Observable , class Value0 , class... ValueN> | |
auto | start_with (Observable o, Value0 v0, ValueN...vn) -> decltype(from(rxu::value_type_t< Observable >(v0), rxu::value_type_t< Observable >(vn)...).concat(o)) |
template<class T > | |
auto | never () -> observable< T, detail::never< T >> |
template<class T > | |
auto | range (T first=0, T last=std::numeric_limits< T >::max(), std::ptrdiff_t step=1) -> observable< T, detail::range< T, identity_one_worker >> |
Returns an observable that executes the specified function when a subscriber subscribes to it. More... | |
template<class T , class Coordination > | |
auto | range (T first, T last, std::ptrdiff_t step, Coordination cn) -> observable< T, detail::range< T, Coordination >> |
Returns an observable that executes the specified function when a subscriber subscribes to it. More... | |
template<class T , class Coordination > | |
auto | range (T first, T last, Coordination cn) -> typename std::enable_if< is_coordination< Coordination >::value, observable< T, detail::range< T, Coordination >>>::type |
Returns an observable that executes the specified function when a subscriber subscribes to it. More... | |
template<class T , class Coordination > | |
auto | range (T first, Coordination cn) -> typename std::enable_if< is_coordination< Coordination >::value, observable< T, detail::range< T, Coordination >>>::type |
Returns an observable that executes the specified function when a subscriber subscribes to it. More... | |
template<class ResourceFactory , class ObservableFactory > | |
auto | scope (ResourceFactory rf, ObservableFactory of) -> observable< rxu::value_type_t< detail::scope_traits< ResourceFactory, ObservableFactory >>, detail::scope< ResourceFactory, ObservableFactory >> |
Returns an observable that makes an observable by the specified observable factory using the resource provided by the specified resource factory for each new observer that subscribes. More... | |
template<class TimePointOrDuration > | |
auto | timer (TimePointOrDuration when) -> typename std::enable_if< detail::defer_timer< TimePointOrDuration, identity_one_worker >::value, typename detail::defer_timer< TimePointOrDuration, identity_one_worker >::observable_type >::type |
Returns an observable that emits an integer at the specified time point. More... | |
template<class TimePointOrDuration , class Coordination > | |
auto | timer (TimePointOrDuration when, Coordination cn) -> typename std::enable_if< detail::defer_timer< TimePointOrDuration, Coordination >::value, typename detail::defer_timer< TimePointOrDuration, Coordination >::observable_type >::type |
Returns an observable that emits an integer at the specified time point. More... | |
auto rxcpp::sources::create | ( | OnSubscribe | os | ) | -> observable<T, detail::create<T, OnSubscribe>> |
Returns an observable that executes the specified function when a subscriber subscribes to it.
T | the type of the items that this observable emits |
OnSubscribe | the type of OnSubscribe handler function |
os | OnSubscribe event handler |
auto rxcpp::sources::defer | ( | ObservableFactory | of | ) | -> observable<rxu::value_type_t<detail::defer_traits<ObservableFactory>>, detail::defer<ObservableFactory>> |
Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes.
ObservableFactory | the type of the observable factory |
of | the observable factory function to invoke for each observer that subscribes to the resulting observable |
auto rxcpp::sources::empty | ( | ) | -> decltype(from<T>()) |
Returns an observable that sends no items to observer and immediately completes, on the specified scheduler.
T | the type of (not) emitted items |
Coordination | the type of the scheduler (optional) |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::empty | ( | Coordination | cn | ) | -> decltype(from<T>(std::move(cn))) |
Returns an observable that sends no items to observer and immediately completes, on the specified scheduler.
T | the type of (not) emitted items |
Coordination | the type of the scheduler (optional) |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::error | ( | E | e | ) | -> decltype(detail::make_error<T>(typename std::conditional<std::is_same<std::exception_ptr, rxu::decay_t<E>>::value, detail::throw_ptr_tag, detail::throw_instance_tag>::type(), std::move(e), identity_immediate())) |
Returns an observable that sends no items to observer and immediately generates an error, on the specified scheduler.
T | the type of (not) emitted items |
Exception | the type of the error |
Coordination | the type of the scheduler (optional) |
e | the error to be passed to observers |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::error | ( | E | e, |
Coordination | cn | ||
) | -> decltype(detail::make_error<T>(typename std::conditional<std::is_same<std::exception_ptr, rxu::decay_t<E>>::value, detail::throw_ptr_tag, detail::throw_instance_tag>::type(), std::move(e), std::move(cn))) |
Returns an observable that sends no items to observer and immediately generates an error, on the specified scheduler.
T | the type of (not) emitted items |
Exception | the type of the error |
Coordination | the type of the scheduler (optional) |
e | the error to be passed to observers |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::from | ( | ) | -> decltype(iterate(std::array<T, 0>(), identity_immediate())) |
Returns an observable that sends an empty set of values and then completes.
T | the type of elements (not) to be sent |
This is a degenerate case of rxcpp::observable<void,void>::from(Value0,ValueN...) operator.
from(Value0 v0, ValueN... vn)
operator. auto rxcpp::sources::from | ( | Coordination | cn | ) | -> typename std::enable_if<is_coordination<Coordination>::value, decltype( iterate(std::array<T, 0>(), std::move(cn)))>::type |
Returns an observable that sends an empty set of values and then completes, on the specified scheduler.
T | the type of elements (not) to be sent |
Coordination | the type of the scheduler |
from(Coordination cn, Value0 v0, ValueN... vn)
operator. auto rxcpp::sources::from | ( | Value0 | v0, |
ValueN... | vn | ||
) | -> typename std::enable_if<!is_coordination<Value0>::value, decltype(iterate(*(std::array<Value0, sizeof...(ValueN) + 1>*)nullptr, identity_immediate()))>::type |
Returns an observable that sends each value from its arguments list.
Value0 | ... |
ValueN | the type of sending values |
v0 | ... |
vn | values to send |
auto rxcpp::sources::from | ( | Coordination | cn, |
Value0 | v0, | ||
ValueN... | vn | ||
) | -> typename std::enable_if<is_coordination<Coordination>::value, decltype(iterate(*(std::array<Value0, sizeof...(ValueN) + 1>*)nullptr, std::move(cn)))>::type |
Returns an observable that sends each value from its arguments list, on the specified scheduler.
Coordination | the type of the scheduler |
Value0 | ... |
ValueN | the type of sending values |
cn | the scheduler to use for scheduling the items |
v0 | ... |
vn | values to send |
auto rxcpp::sources::interval | ( | Duration | period | ) | -> typename std::enable_if< detail::defer_interval<Duration, identity_one_worker>::value, typename detail::defer_interval<Duration, identity_one_worker>::observable_type>::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
Coordination | the type of the scheduler (optional) |
period | period between emitted values |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::interval | ( | rxsc::scheduler::clock_type::duration | period, |
Coordination | cn | ||
) | -> typename std::enable_if< detail::defer_interval<rxsc::scheduler::clock_type::duration, Coordination>::value, typename detail::defer_interval<rxsc::scheduler::clock_type::duration, Coordination>::observable_type>::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
Coordination | the type of the scheduler (optional) |
period | period between emitted values |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::interval | ( | rxsc::scheduler::clock_type::time_point | when, |
Duration | period | ||
) | -> typename std::enable_if< detail::defer_interval<Duration, identity_one_worker>::value, typename detail::defer_interval<Duration, identity_one_worker>::observable_type>::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
Coordination | the type of the scheduler (optional) |
period | period between emitted values |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::interval | ( | rxsc::scheduler::clock_type::time_point | when, |
rxsc::scheduler::clock_type::duration | period, | ||
Coordination | cn | ||
) | -> typename std::enable_if< detail::defer_interval<rxsc::scheduler::clock_type::duration, Coordination>::value, typename detail::defer_interval<rxsc::scheduler::clock_type::duration, Coordination>::observable_type>::type |
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
Coordination | the type of the scheduler (optional) |
period | period between emitted values |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::iterate | ( | Collection | c | ) | -> observable<rxu::value_type_t<detail::iterate_traits<Collection>>, detail::iterate<Collection, identity_one_worker>> |
Returns an observable that sends each value in the collection, on the specified scheduler.
Collection | the type of the collection of values that this observable emits |
Coordination | the type of the scheduler (optional) |
c | collection containing values to send |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::iterate | ( | Collection | c, |
Coordination | cn | ||
) | -> observable<rxu::value_type_t<detail::iterate_traits<Collection>>, detail::iterate<Collection, Coordination>> |
Returns an observable that sends each value in the collection, on the specified scheduler.
Collection | the type of the collection of values that this observable emits |
Coordination | the type of the scheduler (optional) |
c | collection containing values to send |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::just | ( | Value0 | v0 | ) | -> typename std::enable_if<!is_coordination<Value0>::value, decltype(iterate(*(std::array<Value0, 1>*)nullptr, identity_immediate()))>::type |
Returns an observable that sends the specified item to observer and then completes.
T | the type of the emitted item |
v | the value to send |
auto rxcpp::sources::just | ( | Value0 | v0, |
Coordination | cn | ||
) | -> typename std::enable_if<is_coordination<Coordination>::value, decltype(iterate(*(std::array<Value0, 1>*)nullptr, std::move(cn)))>::type |
Returns an observable that sends the specified item to observer and then completes, on the specified scheduler.
T | the type of the emitted item |
Coordination | the type of the scheduler |
v | the value to send |
cn | the scheduler to use for scheduling the items |
auto rxcpp::sources::never | ( | ) | -> observable<T, detail::never<T>> |
auto rxcpp::sources::range | ( | T | first = 0 , |
T | last = std::numeric_limits<T>::max() , |
||
std::ptrdiff_t | step = 1 |
||
) | -> observable<T, detail::range<T, identity_one_worker>> |
Returns an observable that executes the specified function when a subscriber subscribes to it.
T | the type of the items that this observable emits |
OnSubscribe | the type of OnSubscribe handler function |
os | OnSubscribe event handler |
auto rxcpp::sources::range | ( | T | first, |
T | last, | ||
std::ptrdiff_t | step, | ||
Coordination | cn | ||
) | -> observable<T, detail::range<T, Coordination>> |
Returns an observable that executes the specified function when a subscriber subscribes to it.
T | the type of the items that this observable emits |
OnSubscribe | the type of OnSubscribe handler function |
os | OnSubscribe event handler |
auto rxcpp::sources::range | ( | T | first, |
T | last, | ||
Coordination | cn | ||
) | -> typename std::enable_if<is_coordination<Coordination>::value, observable<T, detail::range<T, Coordination>>>::type |
Returns an observable that executes the specified function when a subscriber subscribes to it.
T | the type of the items that this observable emits |
OnSubscribe | the type of OnSubscribe handler function |
os | OnSubscribe event handler |
auto rxcpp::sources::range | ( | T | first, |
Coordination | cn | ||
) | -> typename std::enable_if<is_coordination<Coordination>::value, observable<T, detail::range<T, Coordination>>>::type |
Returns an observable that executes the specified function when a subscriber subscribes to it.
T | the type of the items that this observable emits |
OnSubscribe | the type of OnSubscribe handler function |
os | OnSubscribe event handler |
auto rxcpp::sources::scope | ( | ResourceFactory | rf, |
ObservableFactory | of | ||
) | -> observable<rxu::value_type_t<detail::scope_traits<ResourceFactory, ObservableFactory>>, detail::scope<ResourceFactory, ObservableFactory>> |
Returns an observable that makes an observable by the specified observable factory using the resource provided by the specified resource factory for each new observer that subscribes.
ResourceFactory | the type of the resource factory |
ObservableFactory | the type of the observable factory |
rf | the resource factory function that resturn the rxcpp::resource that is used as a resource by the observable factory |
of | the observable factory function to invoke for each observer that subscribes to the resulting observable |
auto rxcpp::sources::start_with | ( | Observable | o, |
Value0 | v0, | ||
ValueN... | vn | ||
) | -> decltype(from(rxu::value_type_t<Observable>(v0), rxu::value_type_t<Observable>(vn)...).concat(o)) |
Returns an observable that sends the specified values before it begins to send items emitted by the given observable.
Observable | the type of the observable that emits values for resending |
Value0 | ... |
ValueN | the type of sending values |
o | the observable that emits values for resending |
v0 | ... |
vn | values to send |
auto rxcpp::sources::timer | ( | TimePointOrDuration | when | ) | -> typename std::enable_if< detail::defer_timer<TimePointOrDuration, identity_one_worker>::value, typename detail::defer_timer<TimePointOrDuration, identity_one_worker>::observable_type>::type |
Returns an observable that emits an integer at the specified time point.
Coordination | the type of the scheduler (optional) |
when | time point when the value is emitted |
cn | the scheduler to use for scheduling the items (optional) |
auto rxcpp::sources::timer | ( | TimePointOrDuration | when, |
Coordination | cn | ||
) | -> typename std::enable_if< detail::defer_timer<TimePointOrDuration, Coordination>::value, typename detail::defer_timer<TimePointOrDuration, Coordination>::observable_type>::type |
Returns an observable that emits an integer at the specified time point.
Coordination | the type of the scheduler (optional) |
when | time point when the value is emitted |
cn | the scheduler to use for scheduling the items (optional) |