ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
disposables_strategy.hpp
1
// ReactivePlusPlus library
2
//
3
// Copyright Aleksey Loginov 2023 - 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/observers/fwd.hpp>
13
14
#include <rpp/utils/constraints.hpp>
15
16
namespace
rpp::details::observables
17
{
18
struct
dynamic_disposables_strategy
19
{
20
template
<
size_t
Count>
21
using
add
=
dynamic_disposables_strategy
;
22
23
using
disposables_container
=
disposables::dynamic_disposables_container
;
24
using
observer_disposables_strategy
=
observers::dynamic_disposables_strategy
;
25
};
26
27
template
<
size_t
Count>
28
struct
fixed_disposables_strategy
29
{
30
template
<
size_t
AddCount>
31
using
add
=
fixed_disposables_strategy<Count + AddCount>
;
32
33
using
disposables_container
=
disposables::static_disposables_container<Count>
;
34
using
observer_disposables_strategy
=
observers::static_disposables_strategy<Count>
;
35
};
36
37
using
default_disposables_strategy
=
dynamic_disposables_strategy
;
38
39
namespace
constraint
40
{
41
template
<
typename
T>
42
concept
disposables_strategy
=
requires
(
const
T&) {
43
typename
T::template add<
size_t
{}>;
44
typename
T::observer_disposables_strategy;
45
typename
T::disposables_container;
46
requires
observers::constraint::disposables_strategy<typename T::observer_disposables_strategy>
;
47
};
48
}
// namespace constraint
49
}
// namespace rpp::details::observables
rpp::details::disposables::dynamic_disposables_container
Definition
container.hpp:21
rpp::details::disposables::static_disposables_container
Container with fixed std::array as underlying storage.
Definition
fwd.hpp:65
rpp::details::observers::local_disposables_strategy
Definition
fwd.hpp:44
rpp::details::observables::constraint::disposables_strategy
Definition
disposables_strategy.hpp:42
rpp::details::observers::constraint::disposables_strategy
Definition
fwd.hpp:34
rpp::details::observables::dynamic_disposables_strategy
Definition
disposables_strategy.hpp:19
rpp::details::observables::fixed_disposables_strategy
Definition
disposables_strategy.hpp:29
src
rpp
rpp
observables
details
disposables_strategy.hpp
Generated by
1.12.0