ReactivePlusPlus
ReactiveX implementation for C++20
Toggle main menu visibility
Loading...
Searching...
No Matches
grouped_observable.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/AlexInLog/ReactivePlusPlus
9
10
#pragma once
11
12
#include <rpp/observables/observable.hpp>
13
14
namespace
rpp
15
{
16
26
template
<constra
int
::decayed_type KeyType, constra
int
::decayed_type Type, constra
int
::observable_strategy<Type> Strategy>
27
class
grouped_observable final :
public
observable<Type, Strategy>
28
{
29
public
:
30
grouped_observable(KeyType key,
const
Strategy& strategy)
31
: observable<Type, Strategy>{strategy}
32
, m_key{std::move(key)}
33
{
34
}
35
36
grouped_observable(KeyType key, Strategy&& strategy)
37
: observable<Type, Strategy>{std::move(strategy)}
38
, m_key{std::move(key)}
39
{
40
}
41
42
const
KeyType& get_key()
const
{
return
m_key; }
43
44
private
:
45
KeyType m_key;
46
};
47
}
// namespace rpp
src
rpp
rpp
observables
grouped_observable.hpp
Generated by
1.17.0