Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::builtin_protocol_feature Class Reference

#include <protocol_feature_manager.hpp>

Inheritance diagram for sysio::chain::builtin_protocol_feature:
Collaboration diagram for sysio::chain::builtin_protocol_feature:

Public Member Functions

 builtin_protocol_feature ()=default
 
 builtin_protocol_feature (builtin_protocol_feature_t codename, const digest_type &description_digest, flat_set< digest_type > &&dependencies, const protocol_feature_subjective_restrictions &restrictions)
 
void reflector_init ()
 
digest_type digest () const
 
builtin_protocol_feature_t get_codename () const
 
- Public Member Functions inherited from sysio::chain::protocol_feature_base
 protocol_feature_base ()=default
 
 protocol_feature_base (protocol_feature_t feature_type, const digest_type &description_digest, flat_set< digest_type > &&dependencies, const protocol_feature_subjective_restrictions &restrictions)
 
void reflector_init ()
 
protocol_feature_t get_type () const
 

Public Attributes

std::string builtin_feature_codename
 
- Public Attributes inherited from sysio::chain::protocol_feature_base
std::string protocol_feature_type
 
digest_type description_digest
 
flat_set< digest_typedependencies
 
protocol_feature_subjective_restrictions subjective_restrictions
 

Static Public Attributes

static const char * feature_type_string = "builtin"
 

Protected Attributes

builtin_protocol_feature_t _codename
 
- Protected Attributes inherited from sysio::chain::protocol_feature_base
protocol_feature_t _type
 

Friends

class protocol_feature_set
 

Detailed Description

Definition at line 81 of file protocol_feature_manager.hpp.

Constructor & Destructor Documentation

◆ builtin_protocol_feature() [1/2]

sysio::chain::builtin_protocol_feature::builtin_protocol_feature ( )
default

◆ builtin_protocol_feature() [2/2]

sysio::chain::builtin_protocol_feature::builtin_protocol_feature ( builtin_protocol_feature_t codename,
const digest_type & description_digest,
flat_set< digest_type > && dependencies,
const protocol_feature_subjective_restrictions & restrictions )

Definition at line 323 of file protocol_feature_manager.cpp.

328 ,_codename(codename)
329 {
330 auto itr = builtin_protocol_feature_codenames.find( codename );
331 SYS_ASSERT( itr != builtin_protocol_feature_codenames.end(), protocol_feature_validation_exception,
332 "Unsupported builtin_protocol_feature_t passed to constructor: ${codename}",
333 ("codename", static_cast<uint32_t>(codename)) );
334
335 builtin_feature_codename = itr->second.codename;
336 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
const std::unordered_map< builtin_protocol_feature_t, builtin_protocol_feature_spec, enum_hash< builtin_protocol_feature_t > > builtin_protocol_feature_codenames
unsigned int uint32_t
Definition stdint.h:126

Member Function Documentation

◆ digest()

digest_type sysio::chain::builtin_protocol_feature::digest ( ) const

Definition at line 354 of file protocol_feature_manager.cpp.

354 {
355 digest_type::encoder enc;
356 fc::raw::pack( enc, _type );
359 fc::raw::pack( enc, _codename );
360
361 return enc.result();
362 }
void pack(Stream &s, const std::deque< T > &value)
Definition raw.hpp:531
Here is the call graph for this function:

◆ get_codename()

builtin_protocol_feature_t sysio::chain::builtin_protocol_feature::get_codename ( ) const
inline

Definition at line 96 of file protocol_feature_manager.hpp.

96{ return _codename; }

◆ reflector_init()

void sysio::chain::builtin_protocol_feature::reflector_init ( )

Definition at line 338 of file protocol_feature_manager.cpp.

338 {
340
341 for( const auto& p : builtin_protocol_feature_codenames ) {
342 if( builtin_feature_codename.compare( p.second.codename ) == 0 ) {
343 _codename = p.first;
344 return;
345 }
346 }
347
348 SYS_THROW( protocol_feature_validation_exception,
349 "Unsupported builtin protocol feature codename: ${codename}",
350 ("codename", builtin_feature_codename) );
351 }
const mie::Vuint & p
Definition bn.cpp:27
#define SYS_THROW(exc_type, FORMAT,...)
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ protocol_feature_set

friend class protocol_feature_set
friend

Definition at line 98 of file protocol_feature_manager.hpp.

Member Data Documentation

◆ _codename

builtin_protocol_feature_t sysio::chain::builtin_protocol_feature::_codename
protected

Definition at line 103 of file protocol_feature_manager.hpp.

◆ builtin_feature_codename

std::string sysio::chain::builtin_protocol_feature::builtin_feature_codename

Definition at line 101 of file protocol_feature_manager.hpp.

◆ feature_type_string

const char * sysio::chain::builtin_protocol_feature::feature_type_string = "builtin"
static

Definition at line 83 of file protocol_feature_manager.hpp.


The documentation for this class was generated from the following files: