Built-in implementation usable as template parameter TNodeHandler of class StringTree.
This type copies the node's name into memory acquired with the monotonic allocator that the StringTree uses.
StringTree uses monotonic allocation in a very safe way, with the use of this type, repeated removals and insertions of tree nodes, increase the memory usage.StringTree instantiations are provided with this ALib Module:
StringTree.| TChar | The 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 269 of file stringtree.hpp.
#include <stringtree.hpp>
Public Type Index: | |
| using | CharacterType = TChar |
The character type that the StringTree uses for child name and path strings. | |
| using | NameStringType = strings::TString<TChar> |
| The string-type of a node's name. | |
Public Static Method Index: | |
| template<typename TTree> | |
| static void | FreeNode (typename TTree::baseNode &node, TTree &tree) |
| template<typename TTree> | |
| static void | InitializeNode (typename TTree::Node &node, TTree &tree) |
| using alib::containers::StringTreeNamesAlloc< TChar >::CharacterType = TChar |
The character type that the StringTree uses for child name and path strings.
Definition at line 271 of file stringtree.hpp.
| using alib::containers::StringTreeNamesAlloc< TChar >::NameStringType = strings::TString<TChar> |
The string-type of a node's name.
Definition at line 274 of file stringtree.hpp.
|
inlinestatic |
This implementation does nothing.
| tree | The instance of struct template <typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling> StringTreeBase that invokes this method. Any member may be accessed, including nodeTable which contains the allocator that the tree uses for the allocation of nodes. |
| node | The 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. |
| TTree | The type of the templated instantiation of struct template <typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling> StringTreeBase that this method is invoked by. (Deduced by the compiler.) |
Definition at line 317 of file stringtree.hpp.
|
inlinestatic |
This implementation copies the node's name to a piece of memory allocated in the allocator found in field nodeTable of the given tree.
| node | The 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. |
| tree | The instance of struct template <typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling> StringTreeBase that invokes this method. Any member may be accessed, including nodeTable which contains the allocator that the tree uses for the allocation of nodes. |
| TTree | The type of the templated instantiation of struct template <typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling> StringTreeBase that this method is invoked by. (Deduced by the compiler.) |
Definition at line 296 of file stringtree.hpp.