Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::shared_key_weight Struct Reference

#include <authority.hpp>

Collaboration diagram for sysio::chain::shared_key_weight:

Public Member Functions

 shared_key_weight (shared_public_key_data &&k, const weight_type &w)
 
 operator key_weight () const
 

Static Public Member Functions

static shared_key_weight convert (chainbase::allocator< char > allocator, const key_weight &k)
 

Public Attributes

shared_public_key key
 
weight_type weight
 

Friends

bool operator== (const shared_key_weight &lhs, const shared_key_weight &rhs)
 

Detailed Description

Definition at line 105 of file authority.hpp.

Constructor & Destructor Documentation

◆ shared_key_weight()

sysio::chain::shared_key_weight::shared_key_weight ( shared_public_key_data && k,
const weight_type & w )
inline

Definition at line 106 of file authority.hpp.

106 :
107 key(std::move(k)), weight(w) {}
Here is the caller graph for this function:

Member Function Documentation

◆ convert()

static shared_key_weight sysio::chain::shared_key_weight::convert ( chainbase::allocator< char > allocator,
const key_weight & k )
inlinestatic

Definition at line 113 of file authority.hpp.

113 {
114 return std::visit(overloaded {
115 [&](const auto& k1r1em) {
116 return shared_key_weight(k1r1em, k.weight);
117 },
119 size_t psz = fc::raw::pack_size(wa);
120 shared_string wa_ss(std::move(allocator));
121 wa_ss.resize_and_fill( psz, [&wa]( char* data, std::size_t sz ) {
122 fc::datastream<char*> ds(data, sz);
123 fc::raw::pack(ds, wa);
124 });
125
126 return shared_key_weight(std::move(wa_ss), k.weight);
127 }
128 }, k.key._storage);
129 }
wasm_allocator wa
Definition main.cpp:10
static const Segment ds(Segment::ds)
bip::allocator< T, pinnable_mapped_file::segment_manager > allocator
Definition chainbase.hpp:56
void pack(Stream &s, const std::deque< T > &value)
Definition raw.hpp:531
size_t pack_size(const T &v)
Definition raw.hpp:671
chainbase::shared_string shared_string
Definition types.hpp:83
overloaded(Ts...) -> overloaded< Ts... >
shared_key_weight(shared_public_key_data &&k, const weight_type &w)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator key_weight()

sysio::chain::shared_key_weight::operator key_weight ( ) const
inline

Definition at line 109 of file authority.hpp.

109 {
110 return key_weight{key, weight};
111 }

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const shared_key_weight & lhs,
const shared_key_weight & rhs )
friend

Definition at line 134 of file authority.hpp.

134 {
135 return tie( lhs.key, lhs.weight ) == tie( rhs.key, rhs.weight );
136 }

Member Data Documentation

◆ key

shared_public_key sysio::chain::shared_key_weight::key

Definition at line 131 of file authority.hpp.

◆ weight

weight_type sysio::chain::shared_key_weight::weight

Definition at line 132 of file authority.hpp.


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