ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rpp::grouped_observable< KeyType, Type, Strategy > Class Template Referencefinal

Extension over rpp::observable for some "subset" of values from original observable grouped by some key. It has get_key() member function. Used in group_by operator to represent grouped observable. More...

#include <grouped_observable.hpp>

Public Member Functions

 grouped_observable (KeyType key, const Strategy &strategy)
 
 grouped_observable (KeyType key, Strategy &&strategy)
 
const KeyType & get_key () const
 
- Public Member Functions inherited from rpp::observable< Type, Strategy >
template<typename... Args>
requires (!constraint::variadic_decayed_same_as<observable<Type, Strategy>, Args...> && constraint::is_constructible_from<Strategy, Args && ...>)
 observable (Args &&... args)
 
template<constraint::observer_strategy< Type > ObserverStrategy>
void subscribe (observer< Type, ObserverStrategy > &&observer) const
 Subscribes passed observer to emissions from this observable.
 
void subscribe (dynamic_observer< Type > observer) const
 Subscribe passed observer to emissions from this observable.
 
template<constraint::observer_strategy< Type > ObserverStrategy>
requires (!constraint::observer<ObserverStrategy>)
void subscribe (ObserverStrategy &&observer_strategy) const
 Subscribes passed observer strategy to emissions from this observable via construction of observer.
 
template<constraint::observer_strategy< Type > ObserverStrategy>
composite_disposable_wrapper subscribe (const composite_disposable_wrapper &d, observer< Type, ObserverStrategy > &&obs) const
 Subscribe passed observer to emissions from this observable.
 
template<constraint::observer_strategy< Type > ObserverStrategy>
requires (!constraint::observer<ObserverStrategy>)
composite_disposable_wrapper subscribe (const composite_disposable_wrapper &d, ObserverStrategy &&observer_strategy) const
 Subscribes passed observer strategy to emissions from this observable via construction of observer.
 
template<constraint::observer_strategy< Type > ObserverStrategy>
composite_disposable_wrapper subscribe_with_disposable (observer< Type, ObserverStrategy > &&observer) const
 Subscribes passed observer to emissions from this observable.
 
template<constraint::observer_strategy< Type > ObserverStrategy>
requires (!constraint::observer<ObserverStrategy>)
composite_disposable_wrapper subscribe_with_disposable (ObserverStrategy &&observer_strategy) const
 Subscribes observer strategy to emissions from this observable.
 
composite_disposable_wrapper subscribe_with_disposable (dynamic_observer< Type > observer) const
 Subscribe passed observer to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable< const std::exception_ptr & > OnError = rpp::utils::rethrow_error_t, std::invocable<> OnCompleted = rpp::utils::empty_function_t<>>
void subscribe (OnNext &&on_next, OnError &&on_error={}, OnCompleted &&on_completed={}) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable<> OnCompleted>
void subscribe (OnNext &&on_next, OnCompleted &&on_completed) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable< const std::exception_ptr & > OnError = rpp::utils::rethrow_error_t, std::invocable<> OnCompleted = rpp::utils::empty_function_t<>>
composite_disposable_wrapper subscribe_with_disposable (OnNext &&on_next, OnError &&on_error={}, OnCompleted &&on_completed={}) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable<> OnCompleted>
composite_disposable_wrapper subscribe_with_disposable (OnNext &&on_next, OnCompleted &&on_completed) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable< const std::exception_ptr & > OnError = rpp::utils::rethrow_error_t, std::invocable<> OnCompleted = rpp::utils::empty_function_t<>>
composite_disposable_wrapper subscribe (const composite_disposable_wrapper &d, OnNext &&on_next, OnError &&on_error={}, OnCompleted &&on_completed={}) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
template<std::invocable< Type > OnNext, std::invocable<> OnCompleted>
composite_disposable_wrapper subscribe (const composite_disposable_wrapper &d, OnNext &&on_next, OnCompleted &&on_completed) const
 Construct rpp::lambda_observer on the fly and subscribe it to emissions from this observable.
 
auto as_dynamic () const &
 Convert observable to type-erased version.
 
auto as_dynamic () &&
 Convert observable to type-erased version.
 
template<typename Subscribe >
requires rpp::utils::is_base_of_v<std::decay_t<Subscribe>, rpp::operators::details::subscribe_t>
auto operator| (Subscribe &&op) const
 
template<typename Op >
requires (!rpp::utils::is_base_of_v<std::decay_t<Op>, rpp::operators::details::subscribe_t>)
rpp::constraint::observable auto operator| (Op &&op) const &
 
template<typename Op >
requires (!rpp::utils::is_base_of_v<std::decay_t<Op>, rpp::operators::details::subscribe_t>)
rpp::constraint::observable auto operator| (Op &&op) &&
 
template<typename Op >
auto pipe (Op &&op) const &
 
template<typename Op >
auto pipe (Op &&op) &&
 

Additional Inherited Members

- Public Types inherited from rpp::observable< Type, Strategy >
using value_type = Type
 
using strategy_type = Strategy
 
using optimal_disposables_strategy = typename Strategy::optimal_disposables_strategy
 

Detailed Description

template<constraint::decayed_type KeyType, constraint::decayed_type Type, constraint::observable_strategy< Type > Strategy>
class rpp::grouped_observable< KeyType, Type, Strategy >

Extension over rpp::observable for some "subset" of values from original observable grouped by some key. It has get_key() member function. Used in group_by operator to represent grouped observable.

Template Parameters
KeyTypeis type of key
Typeof value this obsevalbe can provide
Strategyis observable strategy

The documentation for this class was generated from the following files: