WvStreams
|
Public Types | |
typedef wv::function< void(const UniWatchInfoTree *, void *)> | Visitor |
typedef wv::function< bool(const UniWatchInfoTree *, const UniWatchInfoTree *)> | Comparator |
Public Member Functions | |
UniWatchInfoTree (UniWatchInfoTree *parent, const UniConfKey &key=UniConfKey::EMPTY) | |
bool | isessential () |
Returns true if the node should not be pruned. | |
UniWatchInfoTree * | parent () const |
Returns a pointer to the parent node, or NULL if there is none. | |
void | setparent (UniWatchInfoTree *parent) |
Reparents this node. | |
UniWatchInfoTree * | root () const |
Returns a pointer to the root node of the tree. | |
UniConfKey | fullkey (const UniWatchInfoTree *ancestor=NULL) const |
Returns full path of this node relative to an ancestor. More... | |
UniWatchInfoTree * | find (const UniConfKey &key) const |
Finds the sub-node with the specified key. More... | |
UniWatchInfoTree * | findchild (const UniConfKey &key) const |
Finds the direct child node with the specified key. More... | |
void | remove (const UniConfKey &key) |
Removes the node for the specified key from the tree and deletes it along with any of its children. More... | |
void | zap () |
Removes and deletes all children of this node. | |
void | visit (const Visitor &visitor, void *userdata, bool preorder=true, bool postorder=false) const |
Performs a traversal on this tree using the specified visitor function and traversal type(s). More... | |
bool | compare (const UniWatchInfoTree *other, const Comparator &comparator) |
Compares this tree with another using the specified comparator function. More... | |
const UniConfKey & | key () const |
Returns the key field. | |
bool | haschildren () const |
Returns true if the node has children. | |
Public Attributes | |
UniWatchInfoList | watches |
Protected Types | |
typedef WvScatterHash< UniHashTreeBase, UniConfKey, Accessor > | Container |
typedef UniHashTreeBaseVisitor | BaseVisitor |
typedef UniHashTreeBaseComparator | BaseComparator |
Protected Member Functions | |
UniConfKey | _fullkey (const UniHashTreeBase *ancestor=NULL) const |
UniHashTreeBase * | _find (const UniConfKey &key) const |
UniHashTreeBase * | _findchild (const UniConfKey &key) const |
Static Protected Member Functions | |
static bool | _recursivecompare (const UniHashTreeBase *a, const UniHashTreeBase *b, const UniHashTreeBaseComparator &comparator) |
static void | _recursive_unsorted_visit (const UniHashTreeBase *a, const UniHashTreeBaseVisitor &visitor, void *userdata, bool preorder, bool postorder) |
Protected Attributes | |
UniHashTreeBase * | xparent |
Container * | xchildren |
Definition at line 48 of file uniconfroot.h.
|
inlineinherited |
Returns full path of this node relative to an ancestor.
If ancestor is NULL, returns the root.
Definition at line 55 of file uniconftree.h.
|
inlineinherited |
Finds the sub-node with the specified key.
If key.isempty(), returns this node.
Definition at line 62 of file uniconftree.h.
|
inlineinherited |
Finds the direct child node with the specified key.
If key.numsegments() == 1, then performs the same task as find(key), but a little faster. Otherwise returns NULL.
Definition at line 71 of file uniconftree.h.
|
inlineinherited |
Removes the node for the specified key from the tree and deletes it along with any of its children.
If the key is UniConfKey::EMPTY, deletes this object.
Definition at line 80 of file uniconftree.h.
|
inlineinherited |
Performs a traversal on this tree using the specified visitor function and traversal type(s).
"visitor" is the tree visitor function "userdata" is userdata for the tree visitor function
Definition at line 108 of file uniconftree.h.
|
inlineinherited |
Compares this tree with another using the specified comparator function.
Comparison of a subtree ends when the comparator returns false. "comparator" is the value compare function "userdata" is userdata for the compare function Returns: true if the comparison function returned true each time
Definition at line 124 of file uniconftree.h.
|
protectedinherited |
the parent of this subtree
Definition at line 62 of file unihashtree.h.
Referenced by UniConfTree< UniConfChangeTree >::parent().
|
protectedinherited |
the hash table of children
Definition at line 63 of file unihashtree.h.
Referenced by UniHashTreeBase::haschildren(), and UniConfTree< UniConfChangeTree >::zap().