ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::files::detail::FTreeNodeHandler Struct Reference

Description:

Specialized TNodeHandler 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 handler StringTreeNamesDynamic. In debug compilations, statistics variables DBG_STATS_STRINGTREE_NAMES and DBG_STATS_STRINGTREE_NAME_OVERFLOWS are increased, just like the original does.

Definition at line 36 of file ftree.inl.

Public Type Index:

using CharacterType = system::PathCharType
 
using NameStringType = system::PathString
 

Public Static Method Index:

static ALIB_DLL void AllocateExtendedInfo (StringTree< MonoAllocator, FInfo, detail::FTreeNodeHandler >::Cursor &node, const system::PathString &symLinkDest, const system::PathString &symLinkRealPath)
 
static void FreeNode (TTree &tree, TTree::Node &node)
 
static void InitializeNode (TTree &tree, TTree::Node &node)
 

Type Definition Details:

◆ CharacterType

The character type that the StringTree uses for child name and path strings. This is taken from the C++ standard library.

Definition at line 40 of file ftree.inl.

◆ NameStringType

The string-type of a node's name. This is a simple static string, allocated with the pool allocator.

Definition at line 44 of file ftree.inl.

Method Details:

◆ AllocateExtendedInfo()

void alib::files::detail::FTreeNodeHandler::AllocateExtendedInfo ( StringTree< MonoAllocator, FInfo, detail::FTreeNodeHandler >::Cursor & node,
const system::PathString & symLinkDest,
const system::PathString & symLinkRealPath )
static

Implements FTree::AllocateExtendedInfo.

Parameters
nodeThe node add extended information to.
symLinkDestIn case of symbolic link types, the symbolic link target.
symLinkRealPathIn case of symbolic link types, the symbolic link target as real path.

Definition at line 62 of file ftree.cpp.

Here is the call graph for this function:

◆ FreeNode()

void alib::files::detail::FTreeNodeHandler::FreeNode ( TTree & tree,
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.

◆ InitializeNode()

void alib::files::detail::FTreeNodeHandler::InitializeNode ( TTree & tree,
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.

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