ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node Struct Reference

Description:

template<typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling>
struct alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node

This is the "final" internal node type, just adds a field of template type T to its base class.

Objects of this type cannot be received directly, and all interfaces are available via public type Cursor only, which holds a pointer to an object of this class.

Definition at line 366 of file stringtreebase.inl.

Inheritance diagram for alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node:
alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeBase alib::lang::BidiNodeBase< NodeBase > alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeKey alib::lang::SidiNodeBase< NodeBase >

Public Field Index:

data
 The templated custom data object stored with each node.
Public Field Index: inherited from alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeBase
NodeList children
 The hook to the doubly linked list of children.
uinteger qtyChildren
 The number of children currently stored in this node.
Public Field Index: inherited from alib::lang::BidiNodeBase< NodeBase >
NodeBase * p
Public Field Index: inherited from alib::lang::SidiNodeBase< NodeBase >
NodeBase * n
Public Field Index: inherited from alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeKey
NodeNameUnion name
NodeBaseparent

Public Method Index:

 Node (const Node &)=delete
 Deleted copy constructor.
template<typename... TArgs>
 Node (const NodeKey &pKey, TArgs &&... args)
 Node (Node &&)=delete
 Deleted move constructor.
template<typename... TArgs>
 Node (NodeBase *pParent, const NameType &pName, TArgs &&... args)
Public Method Index: inherited from alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeBase
 NodeBase (const NodeKey &pKey)
 NodeBase (NodeBase *pParent, const NameType &pName)
strings::TAString< CharacterType, lang::HeapAllocator > & assemblePath (strings::TAString< CharacterType, lang::HeapAllocator > &target, const NodeBase *childNode, const NodeBase *maxParent, CharacterType separatorChar) const
uinteger deleteChild (StringTreeBase *tree, NodeBase *child)
uinteger deleteChildren (StringTreeBase *tree)
int depth () const
int distance (const NodeBase *other) const
NodeBasefindChild (StringTreeBase *tree, const NameType &childName)
template<typename... TArgs>
std::pair< NodeBase *, bool > findOrCreateChild (StringTreeBase *tree, const NameType &childName, TArgs &&... args)
bool isRoot () const
Public Method Index: inherited from alib::lang::BidiNodeBase< NodeBase >
 BidiNodeBase () noexcept=default
 Default constructor. (Does not initialize the pointer!).
void addBefore (NodeBase *elem) noexcept
void addBehind (NodeBase *elem) noexcept
BidiNodeBaseoperator= (const BidiNodeBase &)=delete
NodeBase * prev () const noexcept
void remove () noexcept
 Unhooks this node from a list.
Public Method Index: inherited from alib::lang::SidiNodeBase< NodeBase >
 SidiNodeBase () noexcept=default
 Default constructor. (Does not initialize the pointer.).
NodeBase * addBehind (NodeBase *elem) noexcept
integer count (SidiNodeBase *end=nullptr) const noexcept
bool hasNext () const
void next (SidiNodeBase *p)
SidiNodeBaseoperator= (const SidiNodeBase &)=delete
bool pointsTo (const SidiNodeBase *elem) const
NodeBase * removeNext () noexcept
NodeBase * removeRangeBehind (NodeBase *last) noexcept
Public Method Index: inherited from alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::NodeKey
 NodeKey (NodeBase *pParent, const NameType &pName)

Additional Inherited Members

Public Type Index: inherited from alib::lang::BidiNodeBase< NodeBase >
using FWDNode
 Alias name for an instantiation of the base template.

Field Details:

◆ data

template<typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling>
T alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node::data

The templated custom data object stored with each node.

Definition at line 369 of file stringtreebase.inl.

Constructor(s) / Destructor Details:

◆ Node() [1/2]

template<typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling>
template<typename... TArgs>
alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node::Node ( const NodeKey & pKey,
TArgs &&... args )
inline

Constructor. Custom data is default-initialized.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
pKeyThe key portion of the node.
argsVariadic parameters. Forwarded to the constructor of custom type T.

Definition at line 382 of file stringtreebase.inl.

◆ Node() [2/2]

template<typename TAllocator, typename T, typename TNodeHandler, Recycling TRecycling>
template<typename... TArgs>
alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node::Node ( NodeBase * pParent,
const NameType & pName,
TArgs &&... args )
inline

Constructor. Custom data is default-initialized.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
pParentParent node to search a child for.
pNameChild name to search
argsVariadic parameters. Forwarded to the constructor of custom type T.

Definition at line 392 of file stringtreebase.inl.


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