ReactivePlusPlus
ReactiveX implementation for C++20
|
Creational operators are operators that create new observable. More...
Functions | |
auto | rpp::operators::concat () |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values) | |
template<constraint::memory_model MemoryModel, rpp::constraint::observable TObservable, rpp::constraint::observable... TObservables> requires (std::same_as<rpp::utils::extract_observable_type_t<TObservable>, rpp::utils::extract_observable_type_t<TObservables>> && ...) | |
auto | rpp::source::concat (TObservable &&obs, TObservables &&... others) |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values) | |
template<constraint::memory_model MemoryModel, constraint::iterable Iterable> requires constraint::observable<utils::iterable_value_t<Iterable>> | |
auto | rpp::source::concat (Iterable &&iterable) |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values) | |
template<constraint::decayed_type Type, constraint::on_subscribe< Type > OnSubscribe> | |
auto | rpp::source::create (OnSubscribe &&on_subscribe) |
Construct observable specialized with passed callback function. Most easiesest way to construct observable "on the fly" via lambda and etc. | |
template<std::invocable Factory> requires rpp::constraint::observable<std::invoke_result_t<Factory>> | |
auto | rpp::source::defer (Factory &&observable_factory) |
Creates rpp::observable that calls the specified observable factory to create an observable for each new observer that subscribes. | |
template<constraint::decayed_type Type> | |
auto | rpp::source::empty () |
Creates rpp::observable that emits no items but terminates normally. | |
template<constraint::decayed_type Type> | |
auto | rpp::source::error (std::exception_ptr err) |
Creates rpp::observable that emits no items and terminates with an error. | |
template<constraint::memory_model MemoryModel, constraint::iterable Iterable, schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::from_iterable (Iterable &&iterable, const TScheduler &scheduler) |
Creates observable that emits a items from provided iterable. | |
template<constraint::memory_model MemoryModel, schedulers::constraint::scheduler TScheduler, typename T, typename... Ts> requires (constraint::decayed_same_as<T, Ts> && ...) | |
auto | rpp::source::just (const TScheduler &scheduler, T &&item, Ts &&... items) |
Creates rpp::observable that emits a particular items and completes. | |
template<constraint::memory_model MemoryModel, typename T, typename... Ts> requires (constraint::decayed_same_as<T, Ts> && ...) | |
auto | rpp::source::just (T &&item, Ts &&... items) |
Creates rpp::observable that emits a particular items and completes. | |
template<constraint::memory_model MemoryModel, std::invocable<> Callable> | |
auto | rpp::source::from_callable (Callable &&callable) |
Creates rpp::specific_observable that calls provided callable and emits resulting value of this callable. | |
template<schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::interval (rpp::schedulers::duration initial, rpp::schedulers::duration period, TScheduler &&scheduler) |
Creates rpp::observable that emits a sequential integer every specified time interval, on the specified scheduler. | |
template<schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::interval (rpp::schedulers::time_point initial, rpp::schedulers::duration period, TScheduler &&scheduler) |
Same rpp::source::interval but using a time_point as initial time instead of a duration. | |
template<schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::interval (rpp::schedulers::duration period, TScheduler &&scheduler) |
Creates rpp::observable that emits a sequential integer every specified time interval, on the specified scheduler. | |
template<constraint::decayed_type Type> | |
auto | rpp::source::never () |
Creates rpp::observable that emits no items and does not terminate. | |
template<schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::timer (rpp::schedulers::duration when, TScheduler &&scheduler) |
Creates rpp::observable that emits an integer after a given delay, on the specified scheduler. | |
template<schedulers::constraint::scheduler TScheduler> | |
auto | rpp::source::timer (rpp::schedulers::time_point when, TScheduler &&scheduler) |
Same as rpp::source::timer but using a time_point as delay instead of a duration. | |
Creational operators are operators that create new observable.
|
inline |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values)
Actually it subscribes on first observable from emissions. When first observable completes, then it subscribes on second observable from emissions and etc...
MemoryModel | rpp::memory_model strategy used to handle provided observables |
#include <rpp/operators/concat.hpp>
auto rpp::source::concat | ( | Iterable && | iterable | ) |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values)
Actually it subscribes on first observable from emissions. When first observable completes, then it subscribes on second observable from emissions and etc...
iterable | is container with observables to subscribe on |
MemoryModel | rpp::memory_model strategy used to handle provided observables |
#include <rpp/operators/concat.hpp>
auto rpp::source::concat | ( | TObservable && | obs, |
TObservables &&... | others ) |
Make observable which would merge emissions from underlying observables but without overlapping (current observable completes THEN next started to emit its values)
Actually it subscribes on first observable from emissions. When first observable completes, then it subscribes on second observable from emissions and etc...
obs | first observalbe to subscribe on |
others | rest list of observables to subscribe on |
MemoryModel | rpp::memory_model strategy used to handle provided observables |
#include <rpp/operators/concat.hpp>
auto rpp::source::create | ( | OnSubscribe && | on_subscribe | ) |
Construct observable specialized with passed callback function. Most easiesest way to construct observable "on the fly" via lambda and etc.
Type | is type of values observable would emit |
OnSubscribe | is callback function to implement core logic of observable |
auto rpp::source::defer | ( | Factory && | observable_factory | ) |
Creates rpp::observable that calls the specified observable factory to create an observable for each new observer that subscribes.
observable_factory | is function to create observable to subscribe on. |
auto rpp::source::empty | ( | ) |
Creates rpp::observable that emits no items but terminates normally.
Type | type of value to specify observable |
auto rpp::source::error | ( | std::exception_ptr | err | ) |
Creates rpp::observable that emits no items and terminates with an error.
Type | type of value to specify observable |
err | exception ptr to be sent to subscriber |
auto rpp::source::from_callable | ( | Callable && | callable | ) |
Creates rpp::specific_observable that calls provided callable and emits resulting value of this callable.
memory_model | rpp::memory_model strategy used to handle callable |
auto rpp::source::from_iterable | ( | Iterable && | iterable, |
const TScheduler & | scheduler ) |
Creates observable that emits a items from provided iterable.
memory_model | rpp::memory_model strategy used to handle provided iterable |
scheduler | is scheduler used for scheduling of submissions: next item will be submitted to scheduler when previous one is executed |
iterable | container with values which will be flattened |
auto rpp::source::interval | ( | rpp::schedulers::duration | initial, |
rpp::schedulers::duration | period, | ||
TScheduler && | scheduler ) |
Creates rpp::observable that emits a sequential integer every specified time interval, on the specified scheduler.
initial | duration before first emission |
period | period between emitted values |
scheduler | the scheduler to use for scheduling the items |
auto rpp::source::interval | ( | rpp::schedulers::duration | period, |
TScheduler && | scheduler ) |
Creates rpp::observable that emits a sequential integer every specified time interval, on the specified scheduler.
period | period between emitted values |
scheduler | the scheduler to use for scheduling the items |
auto rpp::source::interval | ( | rpp::schedulers::time_point | initial, |
rpp::schedulers::duration | period, | ||
TScheduler && | scheduler ) |
Same rpp::source::interval but using a time_point as initial time instead of a duration.
initial | time_point before first emission |
period | period between emitted values |
scheduler | the scheduler to use for scheduling the items |
auto rpp::source::just | ( | const TScheduler & | scheduler, |
T && | item, | ||
Ts &&... | items ) |
Creates rpp::observable that emits a particular items and completes.
memory_model | rpp::memory_model startegy used to handle provided items |
Scheduler | type of scheduler used for scheduling of submissions: next item will be submitted to scheduler when previous one is executed |
item | first value to be sent |
items | rest values to be sent |
auto rpp::source::just | ( | T && | item, |
Ts &&... | items ) |
Creates rpp::observable that emits a particular items and completes.
memory_model | rpp::memory_model strategy used to handle provided items |
item | first value to be sent |
items | rest values to be sent |
auto rpp::source::never | ( | ) |
Creates rpp::observable that emits no items and does not terminate.
Type | type of value to specify observable |
auto rpp::source::timer | ( | rpp::schedulers::duration | when, |
TScheduler && | scheduler ) |
Creates rpp::observable that emits an integer after a given delay, on the specified scheduler.
when | duration from now when the value is emitted |
scheduler | the scheduler to use for scheduling the items |
auto rpp::source::timer | ( | rpp::schedulers::time_point | when, |
TScheduler && | scheduler ) |
Same as rpp::source::timer but using a time_point as delay instead of a duration.
when | time point when the value is emitted |
scheduler | the scheduler to use for scheduling the items |