Kagome
Polkadot Runtime Engine in C++17
kagome::storage::trie::OpaqueNodeStorage Class Referencefinal
Collaboration diagram for kagome::storage::trie::OpaqueNodeStorage:

Public Member Functions

 OpaqueNodeStorage (PolkadotTrie::NodeRetrieveFunctor node_retriever, std::shared_ptr< TrieNode > root) noexcept
 
const std::shared_ptr< TrieNode > & getRoot ()
 
std::shared_ptr< const TrieNodegetRoot () const
 
void setRoot (const std::shared_ptr< TrieNode > &root)
 
outcome::result< std::shared_ptr< const TrieNode > > getChild (BranchNode const &parent, uint8_t idx) const
 
outcome::result< std::shared_ptr< TrieNode > > getChild (BranchNode const &parent, uint8_t idx)
 

Static Public Member Functions

static outcome::result< std::unique_ptr< OpaqueNodeStorage > > createAt (std::shared_ptr< OpaqueTrieNode > root, PolkadotTrie::NodeRetrieveFunctor node_retriever)
 

Private Attributes

PolkadotTrie::NodeRetrieveFunctor retrieve_node_
 
std::shared_ptr< TrieNoderoot_
 

Detailed Description

Definition at line 27 of file polkadot_trie_impl.cpp.

Constructor & Destructor Documentation

kagome::storage::trie::OpaqueNodeStorage::OpaqueNodeStorage ( PolkadotTrie::NodeRetrieveFunctor  node_retriever,
std::shared_ptr< TrieNode root 
)
inlinenoexcept

Definition at line 29 of file polkadot_trie_impl.cpp.

Member Function Documentation

static outcome::result<std::unique_ptr<OpaqueNodeStorage> > kagome::storage::trie::OpaqueNodeStorage::createAt ( std::shared_ptr< OpaqueTrieNode root,
PolkadotTrie::NodeRetrieveFunctor  node_retriever 
)
inlinestatic

Definition at line 33 of file polkadot_trie_impl.cpp.

outcome::result<std::shared_ptr<const TrieNode> > kagome::storage::trie::OpaqueNodeStorage::getChild ( BranchNode const &  parent,
uint8_t  idx 
) const
inline

Definition at line 53 of file polkadot_trie_impl.cpp.

outcome::result<std::shared_ptr<TrieNode> > kagome::storage::trie::OpaqueNodeStorage::getChild ( BranchNode const &  parent,
uint8_t  idx 
)
inline

Definition at line 65 of file polkadot_trie_impl.cpp.

const std::shared_ptr<TrieNode>& kagome::storage::trie::OpaqueNodeStorage::getRoot ( )
inline

Definition at line 41 of file polkadot_trie_impl.cpp.

std::shared_ptr<const TrieNode> kagome::storage::trie::OpaqueNodeStorage::getRoot ( ) const
inline

Definition at line 45 of file polkadot_trie_impl.cpp.

void kagome::storage::trie::OpaqueNodeStorage::setRoot ( const std::shared_ptr< TrieNode > &  root)
inline

Definition at line 49 of file polkadot_trie_impl.cpp.

Member Data Documentation

PolkadotTrie::NodeRetrieveFunctor kagome::storage::trie::OpaqueNodeStorage::retrieve_node_
private

Definition at line 76 of file polkadot_trie_impl.cpp.

std::shared_ptr<TrieNode> kagome::storage::trie::OpaqueNodeStorage::root_
private

Definition at line 77 of file polkadot_trie_impl.cpp.


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