ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Fields | Public Methods | List of all members
StringTreeBase< T, TNodeMaintainer, TRecycling >::NodePtrBase Struct Reference
Collaboration diagram for StringTreeBase< T, TNodeMaintainer, TRecycling >::NodePtrBase:
[legend]

Class Description

template<typename T, typename TNodeMaintainer, typename TRecycling>
struct aworx::lib::monomem::detail::StringTreeBase< T, TNodeMaintainer, TRecycling >::NodePtrBase

Non-templated base class of StringTree::NodePtr.

Definition at line 458 of file stringtreebase.inl.

Public Fields

Nodenode
 
StringTreeBasetree
 

Public Methods

 NodePtrBase () noexcept
 
 NodePtrBase (const NodePtrBase &) noexcept=default
 
 NodePtrBase (NodePtrBase &&) noexcept=default
 
 NodePtrBase (StringTreeBase *pTree, Node *pNode) noexcept
 
 ~NodePtrBase () noexcept=default
 
NodefollowPath (SubstringType &path)
 
template<typename... TArgs>
std::pair< Node *, integerfollowPathCreate (const NameType &path, TArgs &&... args)
 
NodePtrBaseoperator= (const NodePtrBase &) noexcept=default
 
NodePtrBaseoperator= (NodePtrBase &&) noexcept=default
 

Constructor & Destructor Documentation

◆ NodePtrBase() [1/4]

NodePtrBase ( StringTreeBase pTree,
Node pNode 
)
inlinenoexcept

Constructor initializing both fields tree and node.

Parameters
pTreeThe StringTree we work on.
pNodeThe node to refer to.

Definition at line 471 of file stringtreebase.inl.

◆ NodePtrBase() [2/4]

NodePtrBase ( )
inlinenoexcept

Default constructor. Creates an invalid (uninitialized) object.

Definition at line 477 of file stringtreebase.inl.

◆ NodePtrBase() [3/4]

NodePtrBase ( const NodePtrBase )
defaultnoexcept

Trivial default copy constructor.

◆ NodePtrBase() [4/4]

NodePtrBase ( NodePtrBase &&  )
defaultnoexcept

Trivial default move constructor.

◆ ~NodePtrBase()

~NodePtrBase ( )
defaultnoexcept

Trivial default destructor.

Member Function Documentation

◆ followPath()

Node* followPath ( SubstringType path)
inline

Finds a child node along the path given, but does not create new nodes. Incomplete results may occur if a child along the path was not found. In this case, parameter path contains the remaining path, excluding a leading separator.

A leading slash (aka TSeparator) allows absolute path addressing, which means the root of node is searched if a leading separator is found.

Besides normal child names, this method accepts

  • multiple separator characters (ignored)
  • child name "." (ignored)
  • child name ".." for parent node
Parameters
[in,out]pathCreation path. Provided as reference and consumed as far as the path exits.
Returns
The node found

Definition at line 518 of file stringtreebase.inl.

Here is the call graph for this function:

◆ followPathCreate()

std::pair<Node*, integer> followPathCreate ( const NameType path,
TArgs &&...  args 
)
inline

Follows the given path and creates non-existing children along the way.

Child names "." and ".." are allowed and respected same as in followPath.

New child nodes are constructed by forwarding the given args. Existing children remain untouched.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
pathThe path to move along.
argsVariadic parameters to be forwarded to constructor of each node that is created.
Returns
A std::pair containing a resulting Node* and the number of nodes created.

Definition at line 583 of file stringtreebase.inl.

Here is the call graph for this function:

◆ operator=() [1/2]

NodePtrBase& operator= ( const NodePtrBase )
defaultnoexcept

Trivial default copy assign operator.

Returns
A reference to this.

◆ operator=() [2/2]

NodePtrBase& operator= ( NodePtrBase &&  )
defaultnoexcept

Trivial default move assign operator.

Returns
A reference to this.

Member Data Documentation

◆ node

Node* node

The currently represented node of the tree.

Definition at line 464 of file stringtreebase.inl.

◆ tree

The StringTree this object refers to.

Definition at line 461 of file stringtreebase.inl.


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