ReactivePlusPlus
ReactiveX implementation for C++20
|
Type-erased version of the rpp::observer
. Any observer can be converted to dynamic_observer via rpp::observer::as_dynamic
member function.
More...
#include <dynamic_observer.hpp>
Public Member Functions | |
dynamic_observer (base &&b) | |
dynamic_observer (const base &b) | |
Public Member Functions inherited from rpp::observer< Type, details::observers::dynamic_strategy< Type > > | |
observer (DisposableStrategy strategy, Args &&... args) | |
observer (Args &&... args) | |
observer (const observer &)=delete | |
observer (observer &&) noexcept=default | |
dynamic_observer< Type > | as_dynamic () && |
Convert current observer to type-erased version. Useful if you need to COPY your observer or to store different observers in same container. | |
observer (DisposableStrategy strategy, Args &&... args) | |
observer (Args &&... args) | |
observer (const observer &)=delete | |
observer (observer &&) noexcept=default | |
dynamic_observer< Type > | as_dynamic () && |
Convert current observer to type-erased version. Useful if you need to COPY your observer or to store different observers in same container. | |
Public Member Functions inherited from rpp::details::observer_impl< Type, Strategy, details::observers::deduce_optimal_disposables_strategy_t< Strategy::preferred_disposables_mode > > | |
void | set_upstream (const disposable_wrapper &d) noexcept |
Observable calls this method to pass disposable. Observer disposes this disposable WHEN observer wants to unsubscribe. | |
bool | is_disposed () const noexcept |
Observable calls this method to check if observer interested or not in emissions. | |
void | on_next (const Type &v) const noexcept |
Observable calls this method to notify observer about new value. | |
void | on_next (Type &&v) const noexcept |
Observable calls this method to notify observer about new value. | |
void | on_error (const std::exception_ptr &err) const noexcept |
Observable calls this method to notify observer about some error during generation next data. | |
void | on_completed () const noexcept |
Observable calls this method to notify observer about completion of emissions. | |
Additional Inherited Members | |
Public Types inherited from rpp::observer< Type, details::observers::dynamic_strategy< Type > > | |
using | DisposableStrategy |
using | Base |
using | DisposableStrategy |
using | Base |
Public Types inherited from rpp::details::observer_impl< Type, Strategy, details::observers::deduce_optimal_disposables_strategy_t< Strategy::preferred_disposables_mode > > | |
using | on_next_lvalue |
using | on_next_rvalue |
Static Public Attributes inherited from rpp::details::observer_impl< Type, Strategy, details::observers::deduce_optimal_disposables_strategy_t< Strategy::preferred_disposables_mode > > | |
static constexpr auto | preferred_disposables_mode |
Protected Member Functions inherited from rpp::details::observer_impl< Type, Strategy, details::observers::deduce_optimal_disposables_strategy_t< Strategy::preferred_disposables_mode > > | |
observer_impl (DisposablesStrategy strategy, Args &&... args) | |
Type-erased version of the rpp::observer
. Any observer can be converted to dynamic_observer via rpp::observer::as_dynamic
member function.
To provide type-erasure it uses std::shared_ptr
. As a result it has worse performance, but it is ONLY way to copy observer.
Type | of value this observer can handle |