libyui  3.0.10
 All Classes Functions Variables Enumerations Friends
SortedTreeItem< PAYLOAD > Class Template Reference

#include <TreeItem.h>

Inheritance diagram for SortedTreeItem< PAYLOAD >:
Collaboration diagram for SortedTreeItem< PAYLOAD >:

Public Member Functions

 SortedTreeItem (PAYLOAD val, SortedTreeItem< PAYLOAD > *parentItem=0)
 
virtual ~SortedTreeItem ()
 
void insertChildSorted (SortedTreeItem< PAYLOAD > *newChild)
 
SortedTreeItem< PAYLOAD > * parent () const
 
SortedTreeItem< PAYLOAD > * next () const
 
SortedTreeItem< PAYLOAD > * firstChild () const
 
- Public Member Functions inherited from TreeItem< PAYLOAD >
 TreeItem (const PAYLOAD &val, TreeItem< PAYLOAD > *parent=0)
 
virtual ~TreeItem ()
 
const PAYLOAD & value () const
 
void setValue (PAYLOAD newValue)
 
TreeItem< PAYLOAD > * parent () const
 
TreeItem< PAYLOAD > * next () const
 
TreeItem< PAYLOAD > * firstChild () const
 
void setParent (TreeItem< PAYLOAD > *newParent)
 
void setNext (TreeItem< PAYLOAD > *newNext)
 
void setFirstChild (TreeItem< PAYLOAD > *newFirstChild)
 
void addChild (TreeItem< PAYLOAD > *newChild)
 

Additional Inherited Members

- Protected Member Functions inherited from TreeItem< PAYLOAD >
 TreeItem (PAYLOAD val, bool autoAddChild, TreeItem< PAYLOAD > *parent=0)
 
- Protected Attributes inherited from TreeItem< PAYLOAD >
PAYLOAD _value
 
TreeItem< PAYLOAD > * _parent
 
TreeItem< PAYLOAD > * _next
 
TreeItem< PAYLOAD > * _firstChild
 

Detailed Description

template<class PAYLOAD>
class SortedTreeItem< PAYLOAD >

Template class for tree items that maintain sort order.

Class 'PAYLOAD' to provide operator<() in addition to what template 'TreeItem' requires.

Definition at line 191 of file TreeItem.h.

Constructor & Destructor Documentation

template<class PAYLOAD>
SortedTreeItem< PAYLOAD >::SortedTreeItem ( PAYLOAD  val,
SortedTreeItem< PAYLOAD > *  parentItem = 0 
)
inline

Constructor. Creates a new tree item with value "val" and inserts it in ascending sort order into the children list of "parent".

Definition at line 199 of file TreeItem.h.

Here is the call graph for this function:

template<class PAYLOAD>
virtual SortedTreeItem< PAYLOAD >::~SortedTreeItem ( )
inlinevirtual

Destructor.

Definition at line 220 of file TreeItem.h.

Member Function Documentation

template<class PAYLOAD>
SortedTreeItem<PAYLOAD>* SortedTreeItem< PAYLOAD >::firstChild ( ) const
inline

Returns this item's first child or 0 if there is none.

Definition at line 276 of file TreeItem.h.

template<class PAYLOAD>
void SortedTreeItem< PAYLOAD >::insertChildSorted ( SortedTreeItem< PAYLOAD > *  newChild)
inline

Insert a child into the internal children list in ascending sort order. Called from the new child's constructor, thus 'public'.

Definition at line 227 of file TreeItem.h.

Here is the call graph for this function:

template<class PAYLOAD>
SortedTreeItem<PAYLOAD>* SortedTreeItem< PAYLOAD >::next ( ) const
inline

Returns this item's next sibling or 0 if there is none.

Definition at line 270 of file TreeItem.h.

template<class PAYLOAD>
SortedTreeItem<PAYLOAD>* SortedTreeItem< PAYLOAD >::parent ( ) const
inline

Returns this item's parent or 0 if there is none.

Definition at line 264 of file TreeItem.h.


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