Kagome
Polkadot Runtime Engine in C++17
kagome::storage::trie::BranchNode Struct Reference

#include <trie_node.hpp>

Inheritance diagram for kagome::storage::trie::BranchNode:
Collaboration diagram for kagome::storage::trie::BranchNode:

Public Member Functions

 BranchNode ()=default
 
 BranchNode (KeyNibbles key_nibbles, std::optional< common::Buffer > value=std::nullopt)
 
 ~BranchNode () override=default
 
int getType () const override
 
uint16_t childrenBitmap () const
 
uint8_t childrenNum () const
 
- Public Member Functions inherited from kagome::storage::trie::TrieNode
 TrieNode ()=default
 
 TrieNode (KeyNibbles key_nibbles, std::optional< common::Buffer > value)
 
 ~TrieNode () override=default
 
Type getTrieType () const noexcept
 
bool isBranch () const noexcept
 
- Public Member Functions inherited from kagome::storage::trie::Node
virtual ~Node ()=default
 

Public Attributes

std::array< std::shared_ptr< OpaqueTrieNode >, kMaxChildrenchildren
 
- Public Attributes inherited from kagome::storage::trie::TrieNode
KeyNibbles key_nibbles
 
std::optional< common::Buffervalue
 

Static Public Attributes

static constexpr uint8_t kMaxChildren = 16
 

Additional Inherited Members

- Public Types inherited from kagome::storage::trie::TrieNode
enum  Type {
  Type::Special, Type::Leaf, Type::BranchEmptyValue, Type::BranchWithValue,
  Type::LeafContainingHashes, Type::BranchContainingHashes, Type::Empty, Type::ReservedForCompactEncoding
}
 

Detailed Description

Definition at line 123 of file trie_node.hpp.

Constructor & Destructor Documentation

kagome::storage::trie::BranchNode::BranchNode ( )
default
kagome::storage::trie::BranchNode::BranchNode ( KeyNibbles  key_nibbles,
std::optional< common::Buffer value = std::nullopt 
)
inlineexplicit

Definition at line 127 of file trie_node.hpp.

kagome::storage::trie::BranchNode::~BranchNode ( )
overridedefault

Member Function Documentation

uint16_t kagome::storage::trie::BranchNode::childrenBitmap ( ) const

Definition at line 15 of file trie_node.cpp.

uint8_t kagome::storage::trie::BranchNode::childrenNum ( ) const

Definition at line 25 of file trie_node.cpp.

int kagome::storage::trie::BranchNode::getType ( ) const
overridevirtual

Implements kagome::storage::trie::Node.

Definition at line 10 of file trie_node.cpp.

Member Data Documentation

std::array<std::shared_ptr<OpaqueTrieNode>, kMaxChildren> kagome::storage::trie::BranchNode::children

Definition at line 141 of file trie_node.hpp.

constexpr uint8_t kagome::storage::trie::BranchNode::kMaxChildren = 16
static

Definition at line 124 of file trie_node.hpp.


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