Bitcoin Core
32.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
ipc
libmultiprocess
include
mp
type-set.h
Go to the documentation of this file.
1
// Copyright (c) The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef MP_PROXY_TYPE_SET_H
6
#define MP_PROXY_TYPE_SET_H
7
8
#include <
mp/proxy-types.h
>
9
#include <
mp/util.h
>
10
11
namespace
mp
{
12
template
<
typename
LocalType,
typename
Value,
typename
Output>
13
void
CustomBuildField
(
TypeList
<std::set<LocalType>>,
14
Priority<1>
,
15
InvokeContext
& invoke_context,
16
Value&& value,
17
Output&& output)
18
{
19
BuildList
(
TypeList<LocalType>
(), invoke_context, output, value);
20
}
21
22
template
<
typename
LocalType,
typename
Input,
typename
ReadDest>
23
decltype
(
auto
)
CustomReadField
(
TypeList
<std::set<LocalType>>,
24
Priority<1>
,
25
InvokeContext
& invoke_context,
26
Input&& input,
27
ReadDest&& read_dest)
28
{
29
return
ReadList
(
30
TypeList<LocalType>
(), invoke_context, input, read_dest,
31
[&](
auto
& value,
size_t
) { value.clear(); },
32
[&](
auto
& value,
auto
&&...
args
) ->
auto
& {
33
return
*value.emplace(std::forward<
decltype
(
args
)>(
args
)...).first;
34
});
35
}
36
}
// namespace mp
37
38
#endif
// MP_PROXY_TYPE_SET_H
args
ArgsManager & args
Definition
bitcoind.cpp:280
util.h
mp
Functions to serialize / deserialize common bitcoin types.
Definition
common-types.h:58
mp::BuildList
void BuildList(TypeList< LocalType >, InvokeContext &invoke_context, Output &&output, Value &&value)
Definition
proxy-types.h:284
mp::CustomReadField
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Definition
common-types.h:84
mp::ReadList
decltype(auto) ReadList(TypeList< LocalType >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest, InitFn &&init, EmplaceFn &&emplace)
Definition
proxy-types.h:295
mp::CustomBuildField
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Definition
common-types.h:64
proxy-types.h
mp::InvokeContext
Definition
proxy-io.h:33
mp::Priority
Definition
util.h:115
mp::TypeList
Generic utility functions used by capnp code.
Definition
util.h:39
Generated on
for Bitcoin Core by
1.18.0