Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
chain_config_helper.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
sysio/chain/types.hpp
>
/* vector */
4
5
namespace
sysio
{
namespace
chain {
6
10
template
<
typename
T,
typename
Val
id
ator>
11
struct
data_range
{
12
13
T
&
config
;
14
vector<fc::unsigned_int>
ids
;
15
Validator
validator
;
16
17
data_range
(
T
& c, Validator val) :
config
(c),
validator
(val){}
18
data_range
(
T
& c,
vector<fc::unsigned_int>
&& id_list,
const
Validator& val)
19
:
data_range
(c, val){
20
ids
= std::move(id_list);
21
}
22
};
23
27
template
<
typename
T,
typename
Val
id
ator>
28
struct
data_entry
{
29
private
:
30
struct
_dummy{};
31
public
:
32
33
T
&
config
;
34
uint32_t
id
;
35
Validator
validator
;
36
data_entry
(
T
& c,
uint32_t
entry_id, Validator
validate
)
37
:
config
(c),
38
id
(entry_id),
39
validator
(
validate
) {}
40
template
<
typename
Y>
41
explicit
data_entry
(
const
data_entry<Y, Validator>
& another,
42
typename
std::enable_if_t<std::is_base_of_v<T, Y>, _dummy> = _dummy{})
43
:
data_entry
(another.
config
, another.
id
, another.
validator
)
44
{}
45
46
bool
is_allowed
()
const
{
47
return
validator
(
id
);
48
}
49
};
50
51
}}
// namespace sysio::chain
types.hpp
config
Definition
permessage_deflate.cpp:42
fc::vector
Definition
vector_fwd.hpp:7
sysio::chain::validate
bool validate(const Authority &auth)
Definition
authority.hpp:262
sysio
Definition
abi_serializer.cpp:8
T
#define T(meth, val, expected)
uint32_t
unsigned int uint32_t
Definition
stdint.h:126
sysio::chain::data_entry
Definition
chain_config_helper.hpp:28
sysio::chain::data_entry::validator
Validator validator
Definition
chain_config_helper.hpp:35
sysio::chain::data_entry::data_entry
data_entry(T &c, uint32_t entry_id, Validator validate)
Definition
chain_config_helper.hpp:36
sysio::chain::data_entry::data_entry
data_entry(const data_entry< Y, Validator > &another, typename std::enable_if_t< std::is_base_of_v< T, Y >, _dummy >=_dummy{})
Definition
chain_config_helper.hpp:41
sysio::chain::data_entry::is_allowed
bool is_allowed() const
Definition
chain_config_helper.hpp:46
sysio::chain::data_entry::config
T & config
Definition
chain_config_helper.hpp:33
sysio::chain::data_entry::id
uint32_t id
Definition
chain_config_helper.hpp:34
sysio::chain::data_range
Definition
chain_config_helper.hpp:11
sysio::chain::data_range::data_range
data_range(T &c, vector< fc::unsigned_int > &&id_list, const Validator &val)
Definition
chain_config_helper.hpp:18
sysio::chain::data_range::validator
Validator validator
Definition
chain_config_helper.hpp:15
sysio::chain::data_range::data_range
data_range(T &c, Validator val)
Definition
chain_config_helper.hpp:17
sysio::chain::data_range::config
T & config
Definition
chain_config_helper.hpp:13
sysio::chain::data_range::ids
vector< fc::unsigned_int > ids
Definition
chain_config_helper.hpp:14
libraries
chain
include
sysio
chain
chain_config_helper.hpp
Generated by
1.12.0