Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::data_entry< T, Validator > Struct Template Reference

#include <chain_config_helper.hpp>

Public Member Functions

 data_entry (T &c, uint32_t entry_id, Validator validate)
 
template<typename Y >
 data_entry (const data_entry< Y, Validator > &another, typename std::enable_if_t< std::is_base_of_v< T, Y >, _dummy >=_dummy{})
 
bool is_allowed () const
 

Public Attributes

Tconfig
 
uint32_t id
 
Validator validator
 

Detailed Description

template<typename T, typename Validator>
struct sysio::chain::data_entry< T, Validator >

helper class to serialize specific class entry

Definition at line 28 of file chain_config_helper.hpp.

Constructor & Destructor Documentation

◆ data_entry() [1/2]

template<typename T , typename Validator >
sysio::chain::data_entry< T, Validator >::data_entry ( T & c,
uint32_t entry_id,
Validator validate )
inline

Definition at line 36 of file chain_config_helper.hpp.

37 : config(c),
38 id(entry_id),
bool validate(const Authority &auth)
Validator validator
T & config
uint32_t id

◆ data_entry() [2/2]

template<typename T , typename Validator >
template<typename Y >
sysio::chain::data_entry< T, Validator >::data_entry ( const data_entry< Y, Validator > & another,
typename std::enable_if_t< std::is_base_of_v< T, Y >, _dummy > = _dummy{} )
inlineexplicit

Definition at line 41 of file chain_config_helper.hpp.

42 {})
43 : data_entry(another.config, another.id, another.validator)
44 {}
data_entry(T &c, uint32_t entry_id, Validator validate)

Member Function Documentation

◆ is_allowed()

template<typename T , typename Validator >
bool sysio::chain::data_entry< T, Validator >::is_allowed ( ) const
inline

Definition at line 46 of file chain_config_helper.hpp.

46 {
47 return validator(id);
48 }

Member Data Documentation

◆ config

template<typename T , typename Validator >
T& sysio::chain::data_entry< T, Validator >::config

Definition at line 33 of file chain_config_helper.hpp.

◆ id

template<typename T , typename Validator >
uint32_t sysio::chain::data_entry< T, Validator >::id

Definition at line 34 of file chain_config_helper.hpp.

◆ validator

template<typename T , typename Validator >
Validator sysio::chain::data_entry< T, Validator >::validator

Definition at line 35 of file chain_config_helper.hpp.


The documentation for this struct was generated from the following file: