|
template<class T , class OnSubscribe > |
static auto | create (OnSubscribe os) -> decltype(rxs::create< T >(std::move(os))) |
| Returns an observable that executes the specified function when a subscriber subscribes to it. More...
|
|
template<class T > |
static auto | range (T first=0, T last=std::numeric_limits< T >::max(), std::ptrdiff_t step=1) -> decltype(rxs::range< T >(first, last, step, identity_current_thread())) |
| Returns an observable that sends values in the range first -last by adding step to the previous value. The values are sent on the specified scheduler. More...
|
|
template<class T , class Coordination > |
static auto | range (T first, T last, std::ptrdiff_t step, Coordination cn) -> decltype(rxs::range< T >(first, last, step, std::move(cn))) |
| Returns an observable that sends values in the range first -last by adding step to the previous value. The values are sent on the specified scheduler. More...
|
|
template<class T , class Coordination > |
static auto | range (T first, T last, Coordination cn) -> decltype(rxs::range< T >(first, last, std::move(cn))) |
| Returns an observable that sends values in the range first -last by adding step to the previous value. The values are sent on the specified scheduler. More...
|
|
template<class T , class Coordination > |
static auto | range (T first, Coordination cn) -> decltype(rxs::range< T >(first, std::move(cn))) |
| Returns an observable that sends values in the range first -last by adding step to the previous value. The values are sent on the specified scheduler. More...
|
|
template<class T > |
static auto | never () -> decltype(rxs::never< T >()) |
|
template<class ObservableFactory > |
static auto | defer (ObservableFactory of) -> decltype(rxs::defer(std::move(of))) |
| Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes. More...
|
|
template<class... AN> |
static auto | interval (rxsc::scheduler::clock_type::duration period, AN **...) -> decltype(rxs::interval(period)) |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class Coordination > |
static auto | interval (rxsc::scheduler::clock_type::duration period, Coordination cn) -> decltype(rxs::interval(period, std::move(cn))) |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class... AN> |
static auto | interval (rxsc::scheduler::clock_type::time_point initial, rxsc::scheduler::clock_type::duration period, AN **...) -> decltype(rxs::interval(initial, period)) |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class Coordination > |
static auto | interval (rxsc::scheduler::clock_type::time_point initial, rxsc::scheduler::clock_type::duration period, Coordination cn) -> decltype(rxs::interval(initial, period, std::move(cn))) |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class... AN> |
static auto | timer (rxsc::scheduler::clock_type::time_point at, AN **...) -> decltype(rxs::timer(at)) |
| Returns an observable that emits an integer at the specified time point. More...
|
|
template<class... AN> |
static auto | timer (rxsc::scheduler::clock_type::duration after, AN **...) -> decltype(rxs::timer(after)) |
| Returns an observable that emits an integer at the specified time point. More...
|
|
template<class Coordination > |
static auto | timer (rxsc::scheduler::clock_type::time_point when, Coordination cn) -> decltype(rxs::timer(when, std::move(cn))) |
| Returns an observable that emits an integer at the specified time point. More...
|
|
template<class Coordination > |
static auto | timer (rxsc::scheduler::clock_type::duration when, Coordination cn) -> decltype(rxs::timer(when, std::move(cn))) |
| Returns an observable that emits an integer at the specified time point. More...
|
|
template<class Collection > |
static auto | iterate (Collection c) -> decltype(rxs::iterate(std::move(c), identity_current_thread())) |
| Returns an observable that sends each value in the collection, on the specified scheduler. More...
|
|
template<class Collection , class Coordination > |
static auto | iterate (Collection c, Coordination cn) -> decltype(rxs::iterate(std::move(c), std::move(cn))) |
| Returns an observable that sends each value in the collection, on the specified scheduler. More...
|
|
template<class T > |
static auto | from () -> decltype( rxs::from< T >()) |
|
template<class T , class Coordination > |
static auto | from (Coordination cn) -> typename std::enable_if< is_coordination< Coordination >::value, decltype( rxs::from< T >(std::move(cn)))>::type |
|
template<class Value0 , class... ValueN> |
static auto | from (Value0 v0, ValueN...vn) -> typename std::enable_if<!is_coordination< Value0 >::value, decltype( rxs::from(v0, vn...))>::type |
|
template<class Coordination , class Value0 , class... ValueN> |
static auto | from (Coordination cn, Value0 v0, ValueN...vn) -> typename std::enable_if< is_coordination< Coordination >::value, decltype( rxs::from(std::move(cn), v0, vn...))>::type |
|
template<class T > |
static auto | just (T v) -> decltype(rxs::just(std::move(v))) |
|
template<class T , class Coordination > |
static auto | just (T v, Coordination cn) -> decltype(rxs::just(std::move(v), std::move(cn))) |
|
template<class Observable , class Value0 , class... ValueN> |
static auto | start_with (Observable o, Value0 v0, ValueN...vn) -> decltype(rxs::start_with(std::move(o), std::move(v0), std::move(vn)...)) |
|
template<class T > |
static 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 > |
static 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 Exception > |
static auto | error (Exception &&e) -> decltype(rxs::error< T >(std::forward< Exception >(e))) |
| Returns an observable that sends no items to observer and immediately generates an error, on the specified scheduler. More...
|
|
template<class T , class Exception , class Coordination > |
static auto | error (Exception &&e, Coordination cn) -> decltype(rxs::error< T >(std::forward< Exception >(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 ResourceFactory , class ObservableFactory > |
static auto | scope (ResourceFactory rf, ObservableFactory of) -> decltype(rxs::scope(std::move(rf), std::move(of))) |
| 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 rxcpp::observable< void, void >
typed as rxcpp::observable<>
, this is a collection of factory methods that return an observable.
- Create a new type of observable
- Sample Code
s.on_next(1);
s.on_next(2);
s.on_completed();
});
ints.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnCompleted
- Create an observable that emits a range of values
- Sample Code
values1.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnCompleted
- Create an observable that emits nothing / generates an error / immediately completes
- Sample Code
values.
take_until(std::chrono::steady_clock::now() + std::chrono::milliseconds(10)).
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
values.
[](int v){printf("OnNext: %d\n", v);},
[](std::exception_ptr ep){
try {std::rethrow_exception(ep);}
catch (const std::exception& ex) {
printf("OnError: %s\n", ex.what());
}
},
[](){printf("OnCompleted\n");});
OnError: Error
from source
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
- Create an observable that generates new observable for each subscriber
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Create an observable that emits items every specified interval of time
- Sample Code
auto start = std::chrono::steady_clock::now() + std::chrono::milliseconds(1);
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Create an observable that emits items in the specified interval of time
- Sample Code
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
- Create an observable that emits all items from a collection
- Sample Code
std::array< int, 3 > a={{1, 2, 3}};
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Create an observable that emits a set of specified items
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Create an observable that emits a single item
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
- Create an observable that emits a set of items and then subscribes to another observable
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 10
OnNext: 11
OnNext: 12
OnCompleted
- Create an observable that generates a new observable based on a generated resource for each subscriber
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnCompleted