Разработчикам Статистика Баунти Документация Партнеры Github
Public Types | Public Member Functions | Public Attributes | List of all members
golos::chain::shared_authority Struct Reference

#include <shared_authority.hpp>

Public Types

typedef boost::interprocess::allocator< shared_authority, boost::interprocess::managed_mapped_file::segment_manager > allocator_type
typedef boost::interprocess::allocator< std::pair< account_name_type, weight_type >, boost::interprocess::managed_mapped_file::segment_manager > account_pair_allocator_type
typedef boost::interprocess::allocator< std::pair< public_key_type, weight_type >, boost::interprocess::managed_mapped_file::segment_manager > key_pair_allocator_type
typedef boost::interprocess::flat_map< account_name_type, weight_type, protocol::string_less, account_pair_allocator_typeaccount_authority_map
typedef boost::interprocess::flat_map< public_key_type, weight_type, std::less< public_key_type >, key_pair_allocator_typekey_authority_map

Public Member Functions

template<typename Allocator >
 shared_authority (const authority &a, const Allocator &alloc)
 shared_authority (const shared_authority &cpy)
template<typename Allocator >
 shared_authority (const Allocator &alloc)
template<typename Allocator , class ... Args>
 shared_authority (const Allocator &alloc, uint32_t weight_threshold, Args... auths)
 operator authority () const
shared_authorityoperator= (const authority &a)
void add_authority (const public_key_type &k, weight_type w)
void add_authority (const account_name_type &k, weight_type w)
template<typename AuthType >
void add_authorities (AuthType k, weight_type w)
template<typename AuthType , class ... Args>
void add_authorities (AuthType k, weight_type w, Args... auths)
vector< public_key_type > get_keys () const
bool is_impossible () const
uint32_t num_auths () const
void clear ()
void validate () const

Public Attributes

uint32_t weight_threshold = 0
account_authority_map account_auths
key_authority_map key_auths

Detailed Description

The purpose of this class is to represent an authority object in a manner compatiable with shared memory storage. This requires all dynamic fields to be allocated with the same allocator that allocated the shared_authority.

Definition at line 18 of file shared_authority.hpp.

Member Typedef Documentation

◆ account_authority_map

typedef boost::interprocess::flat_map<account_name_type, weight_type, protocol::string_less, account_pair_allocator_type> golos::chain::shared_authority::account_authority_map

Definition at line 92 of file shared_authority.hpp.

◆ account_pair_allocator_type

typedef boost::interprocess::allocator<std::pair<account_name_type, weight_type>, boost::interprocess::managed_mapped_file::segment_manager> golos::chain::shared_authority::account_pair_allocator_type

Definition at line 89 of file shared_authority.hpp.

◆ allocator_type

typedef boost::interprocess::allocator<shared_authority, boost::interprocess::managed_mapped_file::segment_manager> golos::chain::shared_authority::allocator_type

Definition at line 87 of file shared_authority.hpp.

◆ key_authority_map

typedef boost::interprocess::flat_map<public_key_type, weight_type, std::less<public_key_type>, key_pair_allocator_type> golos::chain::shared_authority::key_authority_map

Definition at line 93 of file shared_authority.hpp.

◆ key_pair_allocator_type

typedef boost::interprocess::allocator<std::pair<public_key_type, weight_type>, boost::interprocess::managed_mapped_file::segment_manager> golos::chain::shared_authority::key_pair_allocator_type

Definition at line 90 of file shared_authority.hpp.

Constructor & Destructor Documentation

◆ shared_authority() [1/4]

template<typename Allocator >
golos::chain::shared_authority::shared_authority ( const authority &  a,
const Allocator &  alloc 

Definition at line 24 of file shared_authority.hpp.

◆ shared_authority() [2/4]

golos::chain::shared_authority::shared_authority ( const shared_authority cpy)

Definition at line 38 of file shared_authority.hpp.

◆ shared_authority() [3/4]

template<typename Allocator >
golos::chain::shared_authority::shared_authority ( const Allocator &  alloc)

Definition at line 44 of file shared_authority.hpp.

◆ shared_authority() [4/4]

template<typename Allocator , class ... Args>
golos::chain::shared_authority::shared_authority ( const Allocator &  alloc,
uint32_t  weight_threshold,
Args...  auths 

Definition at line 50 of file shared_authority.hpp.

Member Function Documentation

◆ add_authorities() [1/2]

template<typename AuthType >
void golos::chain::shared_authority::add_authorities ( AuthType  k,
weight_type  w 

Definition at line 67 of file shared_authority.hpp.

◆ add_authorities() [2/2]

template<typename AuthType , class ... Args>
void golos::chain::shared_authority::add_authorities ( AuthType  k,
weight_type  w,
Args...  auths 

Definition at line 72 of file shared_authority.hpp.

◆ add_authority() [1/2]

void golos::chain::shared_authority::add_authority ( const public_key_type &  k,
weight_type  w 

Definition at line 40 of file shared_authority.cpp.

◆ add_authority() [2/2]

void golos::chain::shared_authority::add_authority ( const account_name_type &  k,
weight_type  w 

Definition at line 44 of file shared_authority.cpp.

◆ clear()

void golos::chain::shared_authority::clear ( )

Definition at line 72 of file shared_authority.cpp.

◆ get_keys()

vector< public_key_type > golos::chain::shared_authority::get_keys ( ) const

Definition at line 48 of file shared_authority.cpp.

◆ is_impossible()

bool golos::chain::shared_authority::is_impossible ( ) const

Definition at line 57 of file shared_authority.cpp.

◆ num_auths()

uint32_t golos::chain::shared_authority::num_auths ( ) const

Definition at line 68 of file shared_authority.cpp.

◆ operator authority()

golos::chain::shared_authority::operator authority ( ) const

Definition at line 6 of file shared_authority.cpp.

◆ operator=()

shared_authority & golos::chain::shared_authority::operator= ( const authority &  a)

Definition at line 24 of file shared_authority.cpp.

◆ validate()

void golos::chain::shared_authority::validate ( ) const

Definition at line 77 of file shared_authority.cpp.

Member Data Documentation

◆ account_auths

account_authority_map golos::chain::shared_authority::account_auths

Definition at line 96 of file shared_authority.hpp.

◆ key_auths

key_authority_map golos::chain::shared_authority::key_auths

Definition at line 97 of file shared_authority.hpp.

◆ weight_threshold

uint32_t golos::chain::shared_authority::weight_threshold = 0

Definition at line 95 of file shared_authority.hpp.

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