ReactivePlusPlus
ReactiveX implementation for C++20
Toggle main menu visibility
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/AlexInLog/ReactivePlusPlus
9
10
#pragma once
11
12
#include <rpp/disposables/fwd.hpp>
13
#include <rpp/observables/fwd.hpp>
14
#include <rpp/observers/fwd.hpp>
15
16
#include <rpp/utils/constraints.hpp>
17
#include <rpp/utils/utils.hpp>
18
19
namespace
rpp::subjects
20
{
21
template
<rpp::constra
int
::decayed_type Type>
22
class
publish_subject
;
23
24
template
<rpp::constra
int
::decayed_type Type>
25
class
serialized_publish_subject
;
26
27
28
template
<rpp::constra
int
::decayed_type Type>
29
class
replay_subject
;
30
31
template
<rpp::constra
int
::decayed_type Type>
32
class
serialized_replay_subject
;
33
34
35
template
<rpp::constra
int
::decayed_type Type>
36
class
behavior_subject
;
37
38
template
<rpp::constra
int
::decayed_type Type>
39
class
serialized_behavior_subject
;
40
41
42
}
// namespace rpp::subjects
43
44
namespace
rpp::constraint
45
{
46
template
<
typename
T>
47
concept
subject
=
requires
(
const
T& subj) {
48
{
49
subj.get_observer()
50
} ->
rpp::constraint::observer
;
51
{
52
subj.get_observable()
53
} ->
rpp::constraint::observable
;
54
{
55
subj.get_disposable()
56
} ->
rpp::constraint::decayed_any_of<rpp::disposable_wrapper, rpp::composite_disposable_wrapper>
;
57
};
58
}
// namespace rpp::constraint
59
60
namespace
rpp::subjects::utils
61
{
62
template
<constra
int
::subject T>
63
using
extract_subject_type_t = rpp::utils::extract_observer_type_t<decltype(std::declval<T>().get_observer())>;
64
}
// namespace rpp::subjects::utils
rpp::subjects::behavior_subject
Same as rpp::subjects::publish_subject but keeps last value (or default) and emits it to newly subscr...
Definition
behavior_subject.hpp:125
rpp::subjects::publish_subject
Subject which just multicasts values to observers subscribed on it. It contains two parts: observer a...
Definition
publish_subject.hpp:81
rpp::subjects::replay_subject
Same as rpp::subjects::publish_subject but send all earlier emitted values to any new observers.
Definition
replay_subject.hpp:164
rpp::subjects::serialized_behavior_subject
Same as rpp::subjects::behavior_subject but on_next/on_error/on_completed calls are serialized via mu...
Definition
behavior_subject.hpp:139
rpp::subjects::serialized_publish_subject
Serialized version of rpp::subjects::publish_subject.
Definition
publish_subject.hpp:95
rpp::subjects::serialized_replay_subject
Same as rpp::subjects::replay_subject but on_next/on_error/on_completed calls are serialized via mute...
Definition
replay_subject.hpp:178
rpp::constraint::decayed_any_of
Definition
constraints.hpp:28
rpp::constraint::observable
Definition
fwd.hpp:80
rpp::constraint::observer
Definition
fwd.hpp:250
rpp::constraint::subject
Definition
fwd.hpp:47
src
rpp
rpp
subjects
fwd.hpp
Generated by
1.17.0