Base class for StringTree::Cursor
TConst | If true, internal fields representing the StringTree and the current Node become const and the method followPathCreate becomes unavailable. |
Definition at line 496 of file stringtreebase.inl.
Public Type Index: | |
using | cmNode = ATMP_IF_T_F(!TConst, Node, const Node ) |
Constant or mutable version of type Node, depending on template parameter TConst | |
using | cmNodeBase = ATMP_IF_T_F(!TConst, NodeBase, const NodeBase ) |
Constant or mutable version of type NodeBase, depending on template parameter TConst | |
using | cmTree = ATMP_IF_T_F(!TConst, StringTreeBase, const StringTreeBase ) |
Constant or mutable version of the base tree type, depending on template parameter TConst | |
Public Field Index: | |
cmNode * | node |
The currently represented node of the tree. | |
cmTree * | tree |
The StringTree this object refers to. | |
Public Method Index: | |
TCursorBase () noexcept | |
Default constructor. Creates an invalid (uninitialized) object. | |
TCursorBase (cmTree *pTree, cmNode *pNode) noexcept | |
TCursorBase (const TCursorBase &) noexcept=default | |
Trivial default copy constructor. | |
TCursorBase (TCursorBase &&) noexcept=default | |
Trivial default move constructor. | |
~TCursorBase () noexcept=default | |
Trivial default destructor. | |
cmNode * | followPath (SubstringType &path) const |
template<typename... TArgs, bool TEnableIf = !TConst> | |
std::pair< cmNode *, integer > | followPathCreate (const NameType &path, TArgs &&... args) |
TCursorBase & | operator= (const TCursorBase &) noexcept=default |
TCursorBase & | operator= (TCursorBase &&) noexcept=default |
using cmNode = ATMP_IF_T_F(!TConst, Node, const Node ) |
Constant or mutable version of type Node, depending on template parameter TConst
Definition at line 505 of file stringtreebase.inl.
using cmNodeBase = ATMP_IF_T_F(!TConst, NodeBase, const NodeBase ) |
Constant or mutable version of type NodeBase, depending on template parameter TConst
Definition at line 502 of file stringtreebase.inl.
using cmTree = ATMP_IF_T_F(!TConst, StringTreeBase, const StringTreeBase ) |
Constant or mutable version of the base tree type, depending on template parameter TConst
Definition at line 499 of file stringtreebase.inl.
cmNode* node |
The currently represented node of the tree.
Definition at line 512 of file stringtreebase.inl.
cmTree* tree |
The StringTree this object refers to.
Definition at line 509 of file stringtreebase.inl.
|
inlinenoexcept |
Constructor initializing both fields tree and node.
pTree | The StringTree we work on. |
pNode | The node to refer to. |
Definition at line 517 of file stringtreebase.inl.
|
inlinenoexcept |
Default constructor. Creates an invalid (uninitialized) object.
Definition at line 523 of file stringtreebase.inl.
|
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
[in,out] | path | Creation path. Provided as reference and consumed as far as the path exits. |
Definition at line 562 of file stringtreebase.inl.
std::pair< cmNode *, integer > followPathCreate | ( | const NameType & | path, |
TArgs &&... | args ) |
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.
TArgs | Types of variadic parameters given with parameter args. |
path | The path to move along. |
args | Variadic parameters to be forwarded to the constructor of each node that is created. |
std::pair
containing a resulting Node* and the number of nodes created.
|
defaultnoexcept |
Trivial default copy assign operator.
this
.
|
defaultnoexcept |
Trivial default move assign operator.
this
.