ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
FTreeNodeMaintainer Struct Reference

Description:

Specialized TNodeMaintainer for class FTree which recycles extended information objects of type FInfo::EIDirectory , FInfo::EISymLinkFile and FInfo::EISymLinkDir with node deletion.

In respect to the node name allocation, this type behaves like default maintainer StringTreeNamesDynamic . In debug compilations, statistics variables DbgStatsStringTreeNames and DbgStatsStringTreeNameOverflows are increased, just like the original does.

Definition at line 50 of file ftree.hpp.

#include <ftree.hpp>

Public Type Index:

using CharacterType = character
 
using NameStringType = strings::TLocalString<character, 100>
 

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

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

Definition at line 53 of file ftree.hpp.

◆ NameStringType

The string type of a node's name. Here, a buffered dynamic string

Definition at line 56 of file ftree.hpp.

Method Details:

◆ FreeNode()

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

This implementation frees any dynamically allocated memory of the node's name and in addition recycles any extended information object attached to the FInfo object.

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.)

◆ InitializeNode()

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

Copies the node's name to the local string.

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 74 of file ftree.hpp.


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