OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
detail::FileSystemTrieNode< T > Class Template Reference

#include <FileSystemTrie.h>

Public Member Functions

 FileSystemTrieNode (FileSystemTrieNode *parent, std::string_view key)
 
bool hasValue () const
 
T & value ()
 
const T & value () const
 
const auto & children () const
 
FileSystemTrieNodechild (std::string_view name) const
 
FileSystemTrieNodeparent () const
 

Private Attributes

FileSystemTrieNode_parent = nullptr
 
std::string _key
 
std::optional< T > _value
 
std::unordered_map< TransparentString, std::unique_ptr< FileSystemTrieNode >, TransparentStringHash, TransparentStringEquals_children
 

Friends

class FileSystemTrie< T >
 

Constructor & Destructor Documentation

◆ FileSystemTrieNode()

template<class T >
detail::FileSystemTrieNode< T >::FileSystemTrieNode ( FileSystemTrieNode< T > *  parent,
std::string_view  key 
)
inline

Member Function Documentation

◆ child()

template<class T >
FileSystemTrieNode * detail::FileSystemTrieNode< T >::child ( std::string_view  name) const
inline

◆ children()

template<class T >
const auto & detail::FileSystemTrieNode< T >::children ( ) const
inline

◆ hasValue()

template<class T >
bool detail::FileSystemTrieNode< T >::hasValue ( ) const
inline

◆ parent()

template<class T >
FileSystemTrieNode * detail::FileSystemTrieNode< T >::parent ( ) const
inline

◆ value() [1/2]

template<class T >
T & detail::FileSystemTrieNode< T >::value ( )
inline

◆ value() [2/2]

template<class T >
const T & detail::FileSystemTrieNode< T >::value ( ) const
inline

Friends And Related Function Documentation

◆ FileSystemTrie< T >

template<class T >
friend class FileSystemTrie< T >
friend

Member Data Documentation

◆ _children

template<class T >
std::unordered_map<TransparentString, std::unique_ptr<FileSystemTrieNode>, TransparentStringHash, TransparentStringEquals> detail::FileSystemTrieNode< T >::_children
private

Children map. It's possible to jump through hoops here and use std::unordered_set of std::unique_ptr<FileSystemTrieNode> since the key is stored in the FileSystemTrieNode anyway. But it's just not worth it.

◆ _key

template<class T >
std::string detail::FileSystemTrieNode< T >::_key
private

Key in the parent node. It's only used for node removal, and is not exposed through getters.

◆ _parent

template<class T >
FileSystemTrieNode* detail::FileSystemTrieNode< T >::_parent = nullptr
private

Parent of this node.

◆ _value

template<class T >
std::optional<T> detail::FileSystemTrieNode< T >::_value
private

Value, if any.


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