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...
Go to the source code of this file.
|
template<class ResourceFactory , class ObservableFactory > |
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. More...
|
|
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.
- Template Parameters
-
ResourceFactory | the type of the resource factory |
ObservableFactory | the type of the observable factory |
- Parameters
-
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 |
- Returns
- 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.
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnCompleted
#define RXCPP_SOURCES_RX_SCOPE_HPP |