#include <uniconfroot.h>
Inherits UniConfTree< UniWatchInfoTree >.
Collaboration diagram for UniWatchInfoTree:
For internal use only.
Data structure to track requested watches.
Definition at line 47 of file uniconfroot.h.
Public Types | |
typedef WvCallback< bool, const UniWatchInfoTree *, const UniWatchInfoTree *, void * > | 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. | |
UniWatchInfoTree * | find (const UniConfKey &key) const |
Finds the sub-node with the specified key. | |
UniWatchInfoTree * | findchild (const UniConfKey &key) const |
Finds the direct child node with the specified key. | |
void | remove (const UniConfKey &key) |
Removes the node for the specified key from the tree and deletes it along with any of its children. | |
void | zap () |
Removes and deletes all children of this node. | |
void | compare (const UniWatchInfoTree *other, const Comparator &comparator, void *userdata) |
Compares this tree with another using the specified comparator function. | |
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 UniHashTreeBaseComparator | BaseComparator |
Protected Member Functions | |
void | _setparent (UniHashTreeBase *parent) |
UniHashTreeBase * | _root () const |
UniConfKey | _fullkey (const UniHashTreeBase *ancestor=NULL) const |
UniHashTreeBase * | _find (const UniConfKey &key) const |
UniHashTreeBase * | _findchild (const UniConfKey &key) const |
Static Protected Member Functions | |
void | _recursivecompare (const UniHashTreeBase *a, const UniHashTreeBase *b, const UniHashTreeBaseComparator &comparator, void *userdata) |
Protected Attributes | |
UniConfKey | xkey |
UniHashTreeBase * | xparent |
Container * | xchildren |
Friends | |
class | Iter |
|
Definition at line 33 of file unihashtree.h. |
|
Definition at line 38 of file uniconftree.h. |
|
Definition at line 32 of file unihashtree.h. Referenced by UniHashTreeBase::~UniHashTreeBase(). |
|
Definition at line 52 of file uniconfroot.h. |
|
Definition at line 90 of file unihashtree.cc. References UniHashTreeBase::_findchild(), UniConfKey::Iter::next(), and UniConfKey::Iter::rewind(). |
|
Definition at line 104 of file unihashtree.cc. References UniConfKey::isempty(), and UniHashTreeBase::xchildren. Referenced by UniHashTreeBase::_find(). |
|
Definition at line 63 of file unihashtree.cc. References UniHashTreeBase::key(), UniConfKey::prepend(), and UniHashTreeBase::xparent. |
|
Definition at line 140 of file unihashtree.cc. References UniHashTreeBaseComparator. |
|
Definition at line 54 of file unihashtree.cc. References UniHashTreeBase::xparent. |
|
Definition at line 42 of file unihashtree.cc. References UniHashTreeBase::link(), UniHashTreeBase::unlink(), and UniHashTreeBase::xparent. |
|
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 120 of file uniconftree.h. |
|
Finds the sub-node with the specified key. If key.isempty(), returns this node. Definition at line 72 of file uniconftree.h. |
|
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 81 of file uniconftree.h. |
|
Returns full path of this node relative to an ancestor. If ancestor is NULL, returns the root. Definition at line 65 of file uniconftree.h. |
|
Returns true if the node has children.
Definition at line 113 of file unihashtree.cc. References WvScatterHashBase::isempty(), and UniHashTreeBase::xchildren. Referenced by UniTempGen::haschildren(), UniMountTreeGen::haschildren(), UniMountTree::isessential(), and isessential(). |
|
Returns true if the node should not be pruned.
Definition at line 57 of file uniconfroot.h. References UniHashTreeBase::haschildren(), and watches. |
|
Returns the key field.
Definition at line 62 of file unihashtree.h. Referenced by UniHashTreeBase::_fullkey(), and UniHashTreeBase::Accessor::get_key(). |
|
Returns a pointer to the parent node, or NULL if there is none.
Definition at line 50 of file uniconftree.h. |
|
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 90 of file uniconftree.h. |
|
Returns a pointer to the root node of the tree.
Definition at line 58 of file uniconftree.h. |
|
Reparents this node.
Definition at line 54 of file uniconftree.h. |
|
Removes and deletes all children of this node.
Definition at line 94 of file uniconftree.h. |
|
Definition at line 59 of file unihashtree.h. |
|
Definition at line 50 of file uniconfroot.h. Referenced by UniConfRoot::add_callback(), UniConfRoot::del_callback(), and isessential(). |
|
the hash table of children Definition at line 34 of file unihashtree.h. Referenced by UniHashTreeBase::_findchild(), UniHashTreeBase::haschildren(), UniHashTreeBase::UniHashTreeBase(), and UniHashTreeBase::~UniHashTreeBase(). |
|
the name of this entry Definition at line 23 of file unihashtree.h. |
|
the parent of this subtree Definition at line 24 of file unihashtree.h. Referenced by UniHashTreeBase::_fullkey(), UniHashTreeBase::_root(), UniHashTreeBase::_setparent(), UniHashTreeBase::UniHashTreeBase(), and UniHashTreeBase::~UniHashTreeBase(). |