ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
StringTreeBase< T, TNodeMaintainer, TRecycling > Struct Template Reference

Description:

template<typename T, typename TNodeMaintainer, typename TRecycling>
struct alib::monomem::detail::StringTreeBase< T, TNodeMaintainer, TRecycling >

Base struct of StringTree providing internals.

Note
The separation of the internals of class StringTree to this type in namespace detail has no benefit on compilation speed or other positive "technical" effect, nor is it a matter of software design.
A user of derived class HashTable finds all interface methods and types in one place, which is not cluttered by the documentation of the internals found here. Otherwise, the separation is exclusively supporting source code organization.
Template Parameters
TSee template parameters of derived public type.
TNodeMaintainerSee template parameters of derived public type.
TRecyclingSee template parameters of derived public type.

Definition at line 66 of file stringtreebase.inl.

Inheritance diagram for StringTreeBase< T, TNodeMaintainer, TRecycling >:
[legend]
Collaboration diagram for StringTreeBase< T, TNodeMaintainer, TRecycling >:
[legend]

Inner Type Index:

struct  Node
 
struct  NodeBase
 
struct  NodeKey
 
union  RootNodeSpacer
 
struct  TCursorBase
 

Public Type Index:

using CharacterType = typename TNodeMaintainer::CharacterType
 
using ConstCursorBase = TCursorBase<true>
 
using CursorBase = TCursorBase<false>
 
using NameStorageType = typename TNodeMaintainer::NameStringType
 
using NameType = const strings::TString<CharacterType>
 
using NodeList = lang::BidiListHelper<NodeBase>
 
using SubstringType = typename strings::TSubstring<CharacterType>
 
using TSharedRecycler = typename decltype(nodeTable)::TSharedRecycler
 
using ValueType = typename strings::TString<typename TNodeMaintainer::CharacterType>
 

Public Field Index:

int dbgRootDataSet = 0
 
monomem::HashTable< Node, Node, NodeKey, void, typename NodeKey::Hash, typename NodeKey::EqualTo, typename NodeKey::Access, lang::Caching::Enabled, TRecycling > nodeTable
 
RootNodeSpacer root
 
CharacterType separator
 

Public Method Index:

 StringTreeBase (MonoAllocator *allocator, CharacterType pathSeparator)
 
 StringTreeBase (MonoAllocator *allocator, TSharedRecycler &pRecycler, CharacterType pathSeparator)
 
bool checkChildName (const NameType &name) const
 

Type Definition Details:

◆ CharacterType

template<typename T , typename TNodeMaintainer , typename TRecycling >
using CharacterType = typename TNodeMaintainer::CharacterType

The character type of node names and paths strings. This is defined using character type definition CharacterType of template type TNodeMaintainer .

Definition at line 83 of file stringtreebase.inl.

◆ ConstCursorBase

template<typename T , typename TNodeMaintainer , typename TRecycling >
using ConstCursorBase = TCursorBase<true>

The constant version of type StringTreeBase::TCursorBase .

Definition at line 757 of file stringtreebase.inl.

◆ CursorBase

template<typename T , typename TNodeMaintainer , typename TRecycling >
using CursorBase = TCursorBase<false>

The mutable version of type StringTreeBase::TCursorBase .

Definition at line 754 of file stringtreebase.inl.

◆ NameStorageType

template<typename T , typename TNodeMaintainer , typename TRecycling >
using NameStorageType = typename TNodeMaintainer::NameStringType

The string type of node names and paths. This is defined by NameStringType of template type TNodeMaintainer .

Definition at line 90 of file stringtreebase.inl.

◆ NameType

template<typename T , typename TNodeMaintainer , typename TRecycling >
using NameType = const strings::TString<CharacterType>

The string type of node names and paths if provided externally for comparison.

Definition at line 86 of file stringtreebase.inl.

◆ NodeList

template<typename T , typename TNodeMaintainer , typename TRecycling >
using NodeList = lang::BidiListHelper<NodeBase>

Alias shortcut for a bidirectional list of Node elements.

Definition at line 75 of file stringtreebase.inl.

◆ SubstringType

template<typename T , typename TNodeMaintainer , typename TRecycling >
using SubstringType = typename strings::TSubstring<CharacterType>

The sub-string type of paths. This is defined using character type definition CharacterType of template type TNodeMaintainer .

Definition at line 94 of file stringtreebase.inl.

◆ TSharedRecycler

template<typename T , typename TNodeMaintainer , typename TRecycling >
using TSharedRecycler = typename decltype(nodeTable)::TSharedRecycler

The recycler type. See StringTree::TSharedRecycler which exposes this type publicly.

Definition at line 549 of file stringtreebase.inl.

◆ ValueType

template<typename T , typename TNodeMaintainer , typename TRecycling >
using ValueType = typename strings::TString<typename TNodeMaintainer::CharacterType>

The string type of node names and paths.

Definition at line 78 of file stringtreebase.inl.

Field Details:

◆ dbgRootDataSet

template<typename T , typename TNodeMaintainer , typename TRecycling >
int dbgRootDataSet = 0

Flag available only in debug-compilations to detect access to root node's value without prior use of method ConstructRootValue . Also, the destructor issues a warning, in case the root node's value was not deleted with DeleteRootValue .

Definition at line 523 of file stringtreebase.inl.

◆ nodeTable

template<typename T , typename TNodeMaintainer , typename TRecycling >
monomem::HashTable<Node, Node, NodeKey, void, typename NodeKey::Hash, typename NodeKey::EqualTo, typename NodeKey::Access, lang::Caching::Enabled, TRecycling > nodeTable

The child node hash set. This is used to find children of nodes by name. The set contains all children of all nodes.

Definition at line 545 of file stringtreebase.inl.

◆ root

template<typename T , typename TNodeMaintainer , typename TRecycling >
RootNodeSpacer root

The root node.

Definition at line 516 of file stringtreebase.inl.

◆ separator

template<typename T , typename TNodeMaintainer , typename TRecycling >
CharacterType separator

The separator character to use with path strings. This is set once with construction.

Definition at line 531 of file stringtreebase.inl.

Constructor(s) / Destructor Details::

◆ StringTreeBase() [1/2]

template<typename T , typename TNodeMaintainer , typename TRecycling >
StringTreeBase ( MonoAllocator * allocator,
CharacterType pathSeparator )
inline

Constructor.

Parameters
allocatorThe monotonic allocator to use.
pathSeparatorThe separation character used with path strings.

Definition at line 767 of file stringtreebase.inl.

◆ StringTreeBase() [2/2]

template<typename T , typename TNodeMaintainer , typename TRecycling >
StringTreeBase ( MonoAllocator * allocator,
TSharedRecycler & pRecycler,
CharacterType pathSeparator )
inline

Constructor taking a shared recycler.

Parameters
allocatorThe monotonic allocator to use.
pRecyclerThe shared recycler.
pathSeparatorThe separation character used with path strings.

Definition at line 778 of file stringtreebase.inl.

Method Details:

◆ checkChildName()

template<typename T , typename TNodeMaintainer , typename TRecycling >
bool checkChildName ( const NameType & name) const
inline

Simple helper method which checks a node name for not being "." or ".." and for not containing a separator character. In debug-compilations, if it does, an ALib warning is raised.

Parameters
nameThe child name to check.
Returns
true if the name is legal, false otherwise.

Definition at line 792 of file stringtreebase.inl.

Here is the call graph for this function:

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