WvStreams
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
UniWatchInfoTree Class Reference
Inheritance diagram for UniWatchInfoTree:
Inheritance graph
[legend]

Public Types

typedef wv::function< void(const UniWatchInfoTree *, void *)> Visitor
 
typedef wv::function< void(const UniWatchInfoTree *, void *)> Visitor
 
typedef wv::function< bool(const UniWatchInfoTree *, const UniWatchInfoTree *)> Comparator
 
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 (UniWatchInfoTree *parent, const UniConfKey &key=UniConfKey::EMPTY)
 
bool isessential ()
 Returns true if the node should not be pruned.
 
UniWatchInfoTreeparent () const
 Returns a pointer to the parent node, or NULL if there is none.
 
UniWatchInfoTreeparent () const
 Returns a pointer to the parent node, or NULL if there is none.
 
void setparent (UniWatchInfoTree *parent)
 Reparents this node.
 
void setparent (UniWatchInfoTree *parent)
 Reparents this node.
 
UniWatchInfoTreeroot () const
 Returns a pointer to the root node of the tree.
 
UniWatchInfoTreeroot () 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.
 
UniConfKey fullkey (const UniWatchInfoTree *ancestor=NULL) const
 Returns full path of this node relative to an ancestor.
 
UniWatchInfoTreefind (const UniConfKey &key) const
 Finds the sub-node with the specified key.
 
UniWatchInfoTreefind (const UniConfKey &key) const
 Finds the sub-node with the specified key.
 
UniWatchInfoTreefindchild (const UniConfKey &key) const
 Finds the direct child node with the specified key.
 
UniWatchInfoTreefindchild (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 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 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).
 
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 UniWatchInfoTree *other, const Comparator &comparator)
 Compares this tree with another using the specified comparator function.
 
bool compare (const UniWatchInfoTree *other, const Comparator &comparator)
 Compares this tree with another using the specified comparator function.
 
const UniConfKeykey () const
 Returns the key field.
 
const UniConfKeykey () const
 Returns the key field.
 
bool haschildren () const
 Returns true if the node has children.
 
bool haschildren () const
 Returns true if the node has children.
 

Public Attributes

UniWatchInfoList watches
 

Protected Types

typedef WvScatterHash< UniHashTreeBase, UniConfKey, AccessorContainer
 
typedef WvScatterHash< UniHashTreeBase, UniConfKey, AccessorContainer
 
typedef UniHashTreeBaseVisitor BaseVisitor
 
typedef UniHashTreeBaseVisitor BaseVisitor
 
typedef UniHashTreeBaseComparator BaseComparator
 
typedef UniHashTreeBaseComparator BaseComparator
 

Protected Member Functions

UniConfKey _fullkey (const UniHashTreeBase *ancestor=NULL) const
 
UniConfKey _fullkey (const UniHashTreeBase *ancestor=NULL) const
 
UniHashTreeBase_find (const UniConfKey &key) const
 
UniHashTreeBase_find (const UniConfKey &key) const
 
UniHashTreeBase_findchild (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 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)
 
static void _recursive_unsorted_visit (const UniHashTreeBase *a, const UniHashTreeBaseVisitor &visitor, void *userdata, bool preorder, bool postorder)
 

Protected Attributes

UniHashTreeBasexparent
 
Containerxchildren
 

Detailed Description

Definition at line 48 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconfroot.h.

Member Typedef Documentation

◆ Visitor [1/2]

typedef wv::function<void(const UniWatchInfoTree *, void*)> UniConfTree< UniWatchInfoTree >::Visitor
inherited

◆ Visitor [2/2]

typedef wv::function<void(const UniWatchInfoTree *, void*)> UniConfTree< UniWatchInfoTree >::Visitor
inherited

Definition at line 27 of file include/uniconftree.h.

◆ Comparator [1/2]

typedef wv::function<bool(const UniWatchInfoTree *, const UniWatchInfoTree *)> UniConfTree< UniWatchInfoTree >::Comparator
inherited

◆ Comparator [2/2]

typedef wv::function<bool(const UniWatchInfoTree *, const UniWatchInfoTree *)> UniConfTree< UniWatchInfoTree >::Comparator
inherited

Definition at line 28 of file include/uniconftree.h.

◆ Container [1/2]

◆ Container [2/2]

Definition at line 32 of file include/unihashtree.h.

◆ BaseVisitor [1/2]

typedef UniHashTreeBaseVisitor UniHashTreeBase::BaseVisitor
protectedinherited

◆ BaseVisitor [2/2]

typedef UniHashTreeBaseVisitor UniHashTreeBase::BaseVisitor
protectedinherited

Definition at line 33 of file include/unihashtree.h.

◆ BaseComparator [1/2]

typedef UniHashTreeBaseComparator UniHashTreeBase::BaseComparator
protectedinherited

◆ BaseComparator [2/2]

typedef UniHashTreeBaseComparator UniHashTreeBase::BaseComparator
protectedinherited

Definition at line 34 of file include/unihashtree.h.

Constructor & Destructor Documentation

◆ UniWatchInfoTree() [1/2]

UniWatchInfoTree::UniWatchInfoTree ( UniWatchInfoTree parent,
const UniConfKey key = UniConfKey::EMPTY 
)
inline

◆ UniWatchInfoTree() [2/2]

UniWatchInfoTree::UniWatchInfoTree ( UniWatchInfoTree parent,
const UniConfKey key = UniConfKey::EMPTY 
)
inline

Definition at line 53 of file include/uniconfroot.h.

Member Function Documentation

◆ isessential() [1/2]

bool UniWatchInfoTree::isessential ( )
inline

Returns true if the node should not be pruned.

Definition at line 58 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconfroot.h.

References UniHashTreeBase::haschildren().

◆ isessential() [2/2]

bool UniWatchInfoTree::isessential ( )
inline

Returns true if the node should not be pruned.

Definition at line 58 of file include/uniconfroot.h.

References UniHashTreeBase::haschildren().

◆ parent() [1/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::parent ( ) const
inlineinherited

Returns a pointer to the parent node, or NULL if there is none.

Definition at line 40 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ parent() [2/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::parent ( ) const
inlineinherited

Returns a pointer to the parent node, or NULL if there is none.

Definition at line 40 of file include/uniconftree.h.

◆ setparent() [1/2]

void UniConfTree< UniWatchInfoTree >::setparent ( UniWatchInfoTree parent)
inlineinherited

Reparents this node.

Definition at line 44 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ setparent() [2/2]

void UniConfTree< UniWatchInfoTree >::setparent ( UniWatchInfoTree parent)
inlineinherited

Reparents this node.

Definition at line 44 of file include/uniconftree.h.

◆ root() [1/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::root ( ) const
inlineinherited

Returns a pointer to the root node of the tree.

Definition at line 48 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ root() [2/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::root ( ) const
inlineinherited

Returns a pointer to the root node of the tree.

Definition at line 48 of file include/uniconftree.h.

◆ fullkey() [1/2]

UniConfKey UniConfTree< UniWatchInfoTree >::fullkey ( const UniWatchInfoTree ancestor = NULL) const
inlineinherited

Returns full path of this node relative to an ancestor.

If ancestor is NULL, returns the root.

Definition at line 55 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ fullkey() [2/2]

UniConfKey UniConfTree< UniWatchInfoTree >::fullkey ( const UniWatchInfoTree ancestor = NULL) const
inlineinherited

Returns full path of this node relative to an ancestor.

If ancestor is NULL, returns the root.

Definition at line 55 of file include/uniconftree.h.

◆ find() [1/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::find ( const UniConfKey key) const
inlineinherited

Finds the sub-node with the specified key.

If key.isempty(), returns this node.

Definition at line 62 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ find() [2/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::find ( const UniConfKey key) const
inlineinherited

Finds the sub-node with the specified key.

If key.isempty(), returns this node.

Definition at line 62 of file include/uniconftree.h.

◆ findchild() [1/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::findchild ( const UniConfKey key) const
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 debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ findchild() [2/2]

UniWatchInfoTree * UniConfTree< UniWatchInfoTree >::findchild ( const UniConfKey key) const
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 include/uniconftree.h.

◆ remove() [1/2]

void UniConfTree< UniWatchInfoTree >::remove ( const UniConfKey key)
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 debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ remove() [2/2]

void UniConfTree< UniWatchInfoTree >::remove ( const UniConfKey key)
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 include/uniconftree.h.

◆ zap() [1/2]

void UniConfTree< UniWatchInfoTree >::zap ( )
inlineinherited

Removes and deletes all children of this node.

Definition at line 84 of file debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ zap() [2/2]

void UniConfTree< UniWatchInfoTree >::zap ( )
inlineinherited

Removes and deletes all children of this node.

Definition at line 84 of file include/uniconftree.h.

◆ visit() [1/2]

void UniConfTree< UniWatchInfoTree >::visit ( const Visitor &  visitor,
void *  userdata,
bool  preorder = true,
bool  postorder = false 
) const
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 debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ visit() [2/2]

void UniConfTree< UniWatchInfoTree >::visit ( const Visitor &  visitor,
void *  userdata,
bool  preorder = true,
bool  postorder = false 
) const
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 include/uniconftree.h.

◆ compare() [1/2]

bool UniConfTree< UniWatchInfoTree >::compare ( const UniWatchInfoTree other,
const Comparator &  comparator 
)
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 debian/libwvstreams-dev/usr/include/wvstreams/uniconftree.h.

◆ compare() [2/2]

bool UniConfTree< UniWatchInfoTree >::compare ( const UniWatchInfoTree other,
const Comparator &  comparator 
)
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 include/uniconftree.h.

◆ key() [1/2]

const UniConfKey & UniHashTreeBase::key ( ) const
inlineinherited

◆ key() [2/2]

const UniConfKey & UniHashTreeBase::key ( ) const
inlineinherited

Returns the key field.

Definition at line 40 of file include/unihashtree.h.

◆ haschildren()

bool UniHashTreeBase::haschildren ( ) const
inherited

Returns true if the node has children.

Definition at line 114 of file unihashtree.cc.

References UniHashTreeBase::xchildren.

Referenced by UniTempGen::haschildren(), and isessential().

◆ _fullkey()

UniConfKey UniHashTreeBase::_fullkey ( const UniHashTreeBase ancestor = NULL) const
protectedinherited

Definition at line 63 of file unihashtree.cc.

◆ _find()

UniHashTreeBase * UniHashTreeBase::_find ( const UniConfKey key) const
protectedinherited

Definition at line 90 of file unihashtree.cc.

◆ _findchild()

UniHashTreeBase * UniHashTreeBase::_findchild ( const UniConfKey key) const
protectedinherited

Definition at line 105 of file unihashtree.cc.

◆ _recursivecompare()

bool UniHashTreeBase::_recursivecompare ( const UniHashTreeBase a,
const UniHashTreeBase b,
const UniHashTreeBaseComparator &  comparator 
)
staticprotectedinherited

Definition at line 163 of file unihashtree.cc.

◆ _recursive_unsorted_visit()

void UniHashTreeBase::_recursive_unsorted_visit ( const UniHashTreeBase a,
const UniHashTreeBaseVisitor &  visitor,
void *  userdata,
bool  preorder,
bool  postorder 
)
staticprotectedinherited

Definition at line 148 of file unihashtree.cc.

Member Data Documentation

◆ watches

UniWatchInfoList UniWatchInfoTree::watches

◆ xparent

UniHashTreeBase * UniHashTreeBase::xparent
protectedinherited

the parent of this subtree

Definition at line 62 of file debian/libwvstreams-dev/usr/include/wvstreams/unihashtree.h.

Referenced by UniConfTree< Sub >::parent().

◆ xchildren

Container * UniHashTreeBase::xchildren
protectedinherited

the hash table of children

Definition at line 63 of file debian/libwvstreams-dev/usr/include/wvstreams/unihashtree.h.

Referenced by UniHashTreeBase::haschildren(), and UniConfTree< Sub >::zap().


The documentation for this class was generated from the following files: