ALib C++ Library
Library Version: 2510 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 StringTree::Cursor only, which holds a pointer to an object of this class.

Definition at line 386 of file stringtreebase.inl.

Inheritance diagram for alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node:
[legend]
Collaboration diagram for alib::containers::detail::StringTreeBase< TAllocator, T, TNodeHandler, TRecycling >::Node:
[legend]

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!)
 
 BidiNodeBase (BidiNodeBase &&) noexcept=default
 Defaulted move constructor.
 
 BidiNodeBase (const BidiNodeBase &)=delete
 
 BidiNodeBase (NodeBase *next, NodeBase *prev) noexcept
 
void addBefore (NodeBase *elem) noexcept
 
void addBehind (NodeBase *elem) noexcept
 
BidiNodeBaseoperator= (BidiNodeBase &&) noexcept=default
 
BidiNodeBaseoperator= (const BidiNodeBase &)=delete
 
NodeBase * prev () const noexcept
 
void prev (BidiNodeBase *previous) noexcept
 
void remove () noexcept
 Unhooks this node from a list.
 
void remove (NodeBase *last) noexcept
 
- Public Method Index: inherited from alib::lang::SidiNodeBase< NodeBase >
 SidiNodeBase () noexcept=default
 Default constructor. (Does not initialize the pointer.)
 
 SidiNodeBase (const SidiNodeBase &)=delete
 
 SidiNodeBase (NodeBase *next) noexcept
 
 SidiNodeBase (SidiNodeBase &&) noexcept=default
 Defaulted move constructor.
 
NodeBase * addBehind (NodeBase *elem) noexcept
 
integer count (SidiNodeBase *end=nullptr) const noexcept
 
bool hasNext () const
 
NodeBase * next () const
 
void next (SidiNodeBase *p)
 
SidiNodeBaseoperator= (const SidiNodeBase &)=delete
 
SidiNodeBaseoperator= (SidiNodeBase &&) noexcept=default
 
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 389 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 402 of file stringtreebase.inl.

Here is the call graph for this function:

◆ 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 413 of file stringtreebase.inl.

Here is the call graph for this function:

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