#include <uniconftree.h>
Inheritance diagram for UniConfValueTree:
Public Types | |
typedef WvCallback< void, const UniConfValueTree *, void * > | Visitor |
typedef WvCallback< bool, const UniConfValueTree *, const UniConfValueTree *, void * > | Comparator |
Public Member Functions | |
UniConfValueTree (UniConfValueTree *parent, const UniConfKey &key, WvStringParm value) | |
const WvString & | value () const |
Returns the value field. | |
void | setvalue (WvStringParm value) |
Sets the value field. | |
UniConfTree (UniConfValueTree *parent, const UniConfKey &key) | |
Creates a node and links it to a subtree, if parent is non-NULL. | |
UniConfValueTree * | parent () const |
Returns a pointer to the parent node, or NULL if there is none. | |
void | setparent (UniConfValueTree *parent) |
Reparents this node. | |
UniConfValueTree * | root () const |
Returns a pointer to the root node of the tree. | |
UniConfKey | fullkey (const UniConfValueTree *ancestor=NULL) const |
Returns full path of this node relative to an ancestor. | |
UniConfValueTree * | find (const UniConfKey &key) const |
Finds the sub-node with the specified key. | |
UniConfValueTree * | 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 | 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). | |
bool | compare (const UniConfValueTree *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. | |
Protected Types | |
typedef WvScatterHash< UniHashTreeBase, UniConfKey, Accessor > | Container |
typedef UniHashTreeBaseVisitor | BaseVisitor |
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 | |
static bool | _recursivecompare (const UniHashTreeBase *a, const UniHashTreeBase *b, const UniHashTreeBaseComparator &comparator, void *userdata) |
static void | _recursive_unsorted_visit (const UniHashTreeBase *a, const UniHashTreeBaseVisitor &visitor, void *userdata, bool preorder, bool postorder) |
Protected Attributes | |
UniConfKey | xkey |
UniHashTreeBase * | xparent |
Container * | xchildren |
Friends | |
class | Iter |
|
Returns full path of this node relative to an ancestor. If ancestor is NULL, returns the root. |
|
Finds the sub-node with the specified key. If key.isempty(), returns this node. |
|
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. |
|
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. |
|
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 |
|
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 |
|
the name of this entry |
|
the parent of this subtree |
|
the hash table of children |