ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
fwd.hpp
1// ReactivePlusPlus library
2//
3// Copyright Aleksey Loginov 2022 - present.
4// Distributed under the Boost Software License, Version 1.0.
5// (See accompanying file LICENSE_1_0.txt or copy at
6// https://www.boost.org/LICENSE_1_0.txt)
7//
8// Project home: https://github.com/victimsnino/ReactivePlusPlus
9
10#pragma once
11
12#include <rpp/subscribers/constraints.hpp>
13#include <rpp/utils/constraints.hpp>
14#include <rpp/subscriptions/fwd.hpp>
15
16namespace rpp::subjects::details
17{
18struct subject_tag;
19
20template<typename Strategy, typename T>
21concept subject_strategy = requires(Strategy t)
22{
23 {t.get_subscriber()} -> rpp::constraint::subscriber;
24 t.on_subscribe(std::declval<rpp::dynamic_subscriber<T>>());
25};
26
27template<rpp::constraint::decayed_type T, subject_strategy<T> Strategy>
28class base_subject;
29} // namespace rpp::subjects::details
30
31namespace rpp::subjects
32{
33template<rpp::constraint::decayed_type T>
34class publish_subject;
35
36template<rpp::constraint::decayed_type T>
38} // namespace rpp::subjects
subscriber which uses dynamic_observer<T> to hide original callbacks
Definition: dynamic_subscriber.hpp:24
Subject which multicasts values to observers subscribed on it and sends last emitted value (or initia...
Definition: behavior_subject.hpp:119
Definition: base_subject.hpp:23
Subject which just multicasts values to observers subscribed on it. It contains two parts: subscriber...
Definition: publish_subject.hpp:78
Definition: constraints.hpp:19