ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
StringTreeNamesStatic< TChar > Struct Template Reference

Description:

template<typename TChar = character>
struct alib::monomem::StringTreeNamesStatic< TChar >

Built-in implementation usable as template parameter TNodeMaintainer of class StringTree .

This type does not allocate memory and does not copy the key string of a node. Therefore, this type is very efficient to use in situations where exclusively "static" strings for child names and paths are passed to the interface methods of class StringTree (and inner types) which lead to the creation of new child nodes.
The term "static" here means that the strings given are either static character data of a compilation unit or by any other means their allocated memory and the contained data survive the life-cycle of the corresponding StringTree.

See also
Two other built-in implementations of this type to be used with StringTree instantiations are provided with this ALib Module :
Further information can be found in chapter 4. Node and Node Name String Allocation of the reference documentation of class StringTree.
Template Parameters
TCharThe character type of the key strings. This type is used with any interface method of StringTree that accepts a node name or path string.

Definition at line 219 of file stringtree.hpp.

#include <stringtree.hpp>

Public Type Index:

using CharacterType = TChar
 
using NameStringType = strings::TString<TChar>
 

Public Static Method Index:

template<typename TTree >
static void FreeNode (TTree &tree, typename TTree::Node &node)
 
template<typename TTree >
static void InitializeNode (TTree &tree, typename TTree::Node &node)
 

Type Definition Details:

◆ CharacterType

template<typename TChar = character>
using CharacterType = TChar

The character type that the StringTree uses for child name and path strings.

Definition at line 222 of file stringtree.hpp.

◆ NameStringType

template<typename TChar = character>
using NameStringType = strings::TString<TChar>

The string type of a node's name.

Definition at line 225 of file stringtree.hpp.

Method Details:

◆ FreeNode()

template<typename TChar = character>
template<typename TTree >
static void FreeNode ( TTree & tree,
typename TTree::Node & node )
inlinestatic

This implementation is empty.

See also
See description of this class and the "default implementation" StringTreeNamesDynamic .
Parameters
treeThe instance of struct detail::StringTreeBase that invokes this method. Any member may be accessed, including nodeTable which contains the MonoAllocator that the tree uses for the allocation of nodes.
nodeThe node that is to be removed. Allows access to the key and custom value data. While the parent and sibling nodes are likewise accessible, it is strictly forbidden to modify those.
Template Parameters
TTreeThe type of the templated instantiation of struct detail::StringTreeBase that this method is invoked by. (Deduced by the compiler.)

Definition at line 273 of file stringtree.hpp.

◆ InitializeNode()

template<typename TChar = character>
template<typename TTree >
static void InitializeNode ( TTree & tree,
typename TTree::Node & node )
inlinestatic

This implementation is empty.

See also
See description of this class and the "default implementation" StringTreeNamesDynamic .
Parameters
treeThe instance of struct detail::StringTreeBase that invokes this method. Any member may be accessed, including nodeTable which contains the MonoAllocator that the tree uses for the allocation of nodes.
nodeThe node that was just created. Allows access to the key and custom value data. While the parent and sibling nodes are likewise accessible, it is strictly forbidden to modify those.
Template Parameters
TTreeThe type of the templated instantiation of struct detail::StringTreeBase that this method is invoked by. (Deduced by the compiler.)

Definition at line 247 of file stringtree.hpp.


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