Scorum
Public Types | Public Member Functions | Public Attributes | List of all members
scorum::chain::shared_authority Struct Reference

#include <shared_authority.hpp>

Public Types

typedef fc::shared_flat_map< account_name_type, authority_weight_typeaccount_authority_map
 
typedef fc::shared_flat_map< public_key_type, authority_weight_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, authority_weight_type w)
 
void add_authority (const account_name_type &k, authority_weight_type w)
 
template<typename AuthType >
void add_authorities (AuthType k, authority_weight_type w)
 
template<typename AuthType , class... Args>
void add_authorities (AuthType k, authority_weight_type w, Args... auths)
 
std::vector< public_key_typeget_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 compatible with shared memory storage. This requires all dynamic fields to be allocated with the same allocator that allocated the shared_authority.

Definition at line 17 of file shared_authority.hpp.

Member Typedef Documentation

◆ account_authority_map

Definition at line 85 of file shared_authority.hpp.

◆ key_authority_map

Definition at line 86 of file shared_authority.hpp.

Constructor & Destructor Documentation

◆ shared_authority() [1/4]

template<typename Allocator >
scorum::chain::shared_authority::shared_authority ( const authority a,
const Allocator &  alloc 
)
inline

Definition at line 24 of file shared_authority.hpp.

◆ shared_authority() [2/4]

scorum::chain::shared_authority::shared_authority ( const shared_authority cpy)
inline

Definition at line 37 of file shared_authority.hpp.

◆ shared_authority() [3/4]

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

Definition at line 45 of file shared_authority.hpp.

◆ shared_authority() [4/4]

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

Definition at line 52 of file shared_authority.hpp.

Member Function Documentation

◆ add_authorities() [1/2]

template<typename AuthType >
void scorum::chain::shared_authority::add_authorities ( AuthType  k,
authority_weight_type  w 
)
inline

Definition at line 67 of file shared_authority.hpp.

◆ add_authorities() [2/2]

template<typename AuthType , class... Args>
void scorum::chain::shared_authority::add_authorities ( AuthType  k,
authority_weight_type  w,
Args...  auths 
)
inline

Definition at line 72 of file shared_authority.hpp.

◆ add_authority() [1/2]

void scorum::chain::shared_authority::add_authority ( const account_name_type k,
authority_weight_type  w 
)

Definition at line 43 of file shared_authority.cpp.

◆ add_authority() [2/2]

void scorum::chain::shared_authority::add_authority ( const public_key_type k,
authority_weight_type  w 
)

Definition at line 38 of file shared_authority.cpp.

◆ clear()

void scorum::chain::shared_authority::clear ( )

Definition at line 72 of file shared_authority.cpp.

◆ get_keys()

std::vector< public_key_type > scorum::chain::shared_authority::get_keys ( ) const

Definition at line 48 of file shared_authority.cpp.

◆ is_impossible()

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

Definition at line 57 of file shared_authority.cpp.

◆ num_auths()

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

Definition at line 67 of file shared_authority.cpp.

◆ operator authority()

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

Definition at line 6 of file shared_authority.cpp.

◆ operator=()

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

Definition at line 23 of file shared_authority.cpp.

◆ validate()

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

Definition at line 78 of file shared_authority.cpp.

Member Data Documentation

◆ account_auths

account_authority_map scorum::chain::shared_authority::account_auths

Definition at line 89 of file shared_authority.hpp.

◆ key_auths

key_authority_map scorum::chain::shared_authority::key_auths

Definition at line 90 of file shared_authority.hpp.

◆ weight_threshold

uint32_t scorum::chain::shared_authority::weight_threshold = 0

Definition at line 88 of file shared_authority.hpp.


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