sgns::storage::trie::SuperGeniusTrieFactory¶
#include <supergenius_trie_factory.hpp>
Inherits from IComponent
Inherited by sgns::storage::trie::SuperGeniusTrieFactoryImpl
Public Types¶
| Name | |
|---|---|
| using std::function< outcome::result< SuperGeniusTrie::NodePtr >( SuperGeniusTrie::BranchPtr, uint8_t)> | ChildRetrieveFunctor |
Public Functions¶
| Name | |
|---|---|
| virtual std::unique_ptr< SuperGeniusTrie > | createEmpty(ChildRetrieveFunctor f =defaultChildRetriever) const =default =0 |
| virtual std::unique_ptr< SuperGeniusTrie > | createFromRoot(SuperGeniusTrie::NodePtr root, ChildRetrieveFunctor f =defaultChildRetriever) const =default =0 |
| ~SuperGeniusTrieFactory() override =default |
Protected Functions¶
| Name | |
|---|---|
| outcome::result< SuperGeniusTrie::NodePtr > | defaultChildRetriever(const SuperGeniusTrie::BranchPtr & branch, uint8_t idx) |
Additional inherited members¶
Public Functions inherited from IComponent
| Name | |
|---|---|
| virtual | ~IComponent() =default |
| virtual std::string | GetName() =0 |
Public Types Documentation¶
using ChildRetrieveFunctor¶
using sgns::storage::trie::SuperGeniusTrieFactory::ChildRetrieveFunctor =
std::function<outcome::result<SuperGeniusTrie::NodePtr>(
SuperGeniusTrie::BranchPtr, uint8_t)>;
Public Functions Documentation¶
function createEmpty¶
virtual std::unique_ptr< SuperGeniusTrie > createEmpty(
ChildRetrieveFunctor f =defaultChildRetriever
) const =default =0
Parameters:
- f functor that a trie uses to obtain a child of a branch. If optional is none, the default one will be used
Reimplemented by: sgns::storage::trie::SuperGeniusTrieFactoryImpl::createEmpty
Creates an empty trie
function createFromRoot¶
virtual std::unique_ptr< SuperGeniusTrie > createFromRoot(
SuperGeniusTrie::NodePtr root,
ChildRetrieveFunctor f =defaultChildRetriever
) const =default =0
Parameters:
- root root node for the trie
- f functor that a trie uses to obtain a child of a branch. If optional is none, the default one will be used
Reimplemented by: sgns::storage::trie::SuperGeniusTrieFactoryImpl::createFromRoot
Creates a trie with the given root
function ~SuperGeniusTrieFactory¶
Protected Functions Documentation¶
function defaultChildRetriever¶
static inline outcome::result< SuperGeniusTrie::NodePtr > defaultChildRetriever(
const SuperGeniusTrie::BranchPtr & branch,
uint8_t idx
)
Updated on 2026-04-13 at 23:22:46 -0700