template<typename T, typename TNodeMaintainer, typename TRecycling>
struct alib::monomem::detail::StringTreeBase< T, TNodeMaintainer, TRecycling >::NodeBase
This is the base class of the internal node type Node . This type implements functionality needed. Derived type Node then only adds the custom value T
.
Objects of this type can not be received directly and all interface is available via public type StringTree::Cursor only, which holds a pointer to an object of this class.
Definition at line 213 of file stringtreebase.inl.
|
| NodeBase (const NodeKey &pKey) |
|
| NodeBase (NodeBase *pParent, const NameType &pName) |
|
AString & | assemblePath (AString &target, const NodeBase *childNode, const NodeBase *maxParent, character separatorChar) const |
|
uinteger | deleteChild (StringTreeBase *tree, NodeBase *child) |
|
uinteger | deleteChildren (StringTreeBase *tree) |
|
int | depth () const |
|
NodeBase * | findChild (StringTreeBase *tree, const NameType &childName) |
|
template<typename... TArgs> |
std::pair< NodeBase *, bool > | findOrCreateChild (StringTreeBase *tree, const NameType &childName, TArgs &&... args) |
|
bool | isRoot () const |
|
| BidiNodeBase () noexcept=default |
|
| BidiNodeBase (BidiNodeBase &&) noexcept=default |
|
| BidiNodeBase (const BidiNodeBase &)=delete |
|
| BidiNodeBase (NodeBase *next, NodeBase *prev) noexcept |
|
void | addBefore (NodeBase *elem) |
|
void | addBehind (NodeBase *elem) |
|
BidiNodeBase & | operator= (BidiNodeBase &&) noexcept=default |
|
BidiNodeBase & | operator= (const BidiNodeBase &)=delete |
|
NodeBase * | prev () const |
|
void | prev (BidiNodeBase *newPrev) |
|
void | remove () |
|
void | remove (NodeBase *last) |
|
| SidiNodeBase () noexcept=default |
|
| SidiNodeBase (const SidiNodeBase &)=delete |
|
| SidiNodeBase (NodeBase *next) noexcept |
|
| SidiNodeBase (SidiNodeBase &&) noexcept=default |
|
NodeBase * | addBehind (NodeBase *elem) |
|
integer | count (SidiNodeBase *end=nullptr) const |
|
bool | hasNext () const |
|
NodeBase * | next () const |
|
void | next (SidiNodeBase *p) |
|
SidiNodeBase & | operator= (const SidiNodeBase &)=delete |
|
SidiNodeBase & | operator= (SidiNodeBase &&) noexcept=default |
|
bool | pointsTo (const SidiNodeBase *elem) const |
|
NodeBase * | removeNext () |
|
NodeBase * | removeRangeBehind (NodeBase *last) |
|
| NodeKey (NodeBase *pParent, const NameType &pName) |
|
template<typename T , typename TNodeMaintainer , typename TRecycling >
template<typename... TArgs>
Searches a child with a given name, if not found, one is created. The name is not checked for .
, ..
or if separation characters.
- Template Parameters
-
TArgs | Types of variadic parameters given with parameter args . |
- Parameters
-
tree | The tree this node belongs to. |
childName | The name of the child to search. |
args | Variadic parameters to be forwarded to constructor of custom type T in the case a child is created. |
- Returns
- A pair containing an iterator referencing either the element found or the new element added. The bool component is
true
if the insertion took place and false
nothing was changed.
Definition at line 320 of file stringtreebase.inl.