CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::PatriciaTreeMixin< TTree > Class Template Reference

A mixin for adding patricia tree support to a cache. More...

Inheritance diagram for catapult::cache::PatriciaTreeMixin< TTree >:

Public Member Functions

 PatriciaTreeMixin (const TTree *pTree)
 Creates a mixin around pTree. More...
 
bool supportsMerkleRoot () const
 Returns true if merkle root is supported. More...
 
std::pair< Hash256, bool > tryGetMerkleRoot () const
 Tries to get the merkle root if supported. More...
 
std::pair< Hash256, bool > tryLookup (const typename TTree::KeyType &key, std::vector< tree::TreeNode > &nodePath) const
 Tries to find the value associated with key in the tree and stores proof of existence or not in nodePath. More...
 

Private Attributes

const TTree * m_pTree
 

Detailed Description

template<typename TTree>
class catapult::cache::PatriciaTreeMixin< TTree >

A mixin for adding patricia tree support to a cache.

Constructor & Destructor Documentation

◆ PatriciaTreeMixin()

template<typename TTree >
catapult::cache::PatriciaTreeMixin< TTree >::PatriciaTreeMixin ( const TTree *  pTree)
inlineexplicit

Creates a mixin around pTree.

Member Function Documentation

◆ supportsMerkleRoot()

template<typename TTree >
bool catapult::cache::PatriciaTreeMixin< TTree >::supportsMerkleRoot ( ) const
inline

Returns true if merkle root is supported.

◆ tryGetMerkleRoot()

template<typename TTree >
std::pair<Hash256, bool> catapult::cache::PatriciaTreeMixin< TTree >::tryGetMerkleRoot ( ) const
inline

Tries to get the merkle root if supported.

◆ tryLookup()

template<typename TTree >
std::pair<Hash256, bool> catapult::cache::PatriciaTreeMixin< TTree >::tryLookup ( const typename TTree::KeyType &  key,
std::vector< tree::TreeNode > &  nodePath 
) const
inline

Tries to find the value associated with key in the tree and stores proof of existence or not in nodePath.

Member Data Documentation

◆ m_pTree

template<typename TTree >
const TTree* catapult::cache::PatriciaTreeMixin< TTree >::m_pTree
private

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