Kagome
Polkadot Runtime Engine in C++17
polkadot_trie_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_STORAGE_TRIE_IMPL_POLKADOT_TRIE_FACTORY
7 #define KAGOME_STORAGE_TRIE_IMPL_POLKADOT_TRIE_FACTORY
8 
10 
11 namespace kagome::storage::trie {
12 
14  public:
20  virtual std::unique_ptr<PolkadotTrie> createEmpty(
23 
29  virtual std::shared_ptr<PolkadotTrie> createFromRoot(
33 
34  virtual ~PolkadotTrieFactory() = default;
35  };
36 
37 } // namespace kagome::storage::trie
38 
39 #endif // KAGOME_STORAGE_TRIE_IMPL_POLKADOT_TRIE_FACTORY
virtual std::unique_ptr< PolkadotTrie > createEmpty(PolkadotTrie::NodeRetrieveFunctor f=PolkadotTrie::defaultNodeRetrieveFunctor) const =0
std::shared_ptr< TrieNode > NodePtr
virtual std::shared_ptr< PolkadotTrie > createFromRoot(PolkadotTrie::NodePtr root, PolkadotTrie::NodeRetrieveFunctor f=PolkadotTrie::defaultNodeRetrieveFunctor) const =0
std::function< outcome::result< NodePtr >(std::shared_ptr< OpaqueTrieNode > const &)> NodeRetrieveFunctor
static outcome::result< NodePtr > defaultNodeRetrieveFunctor(const std::shared_ptr< OpaqueTrieNode > &node)