Rudiments
Public Member Functions | List of all members
treenode< valuetype > Class Template Referenceabstract

Inherits nodecollectionnode< valuetype >.

Inherited by avltreenode< valuetype >.

Public Member Functions

virtual void setValue (valuetype value)=0
 
virtual valuetype getValue ()=0
 
virtual valuetype & getReference ()=0
 
virtual treenode< valuetype > * getParent ()=0
 
virtual treenode< valuetype > * getLeftChild ()=0
 
virtual treenode< valuetype > * getRightChild ()=0
 
virtual uint8_t getLeftHeight ()=0
 
virtual uint8_t getRightHeight ()=0
 
virtual treenode< valuetype > * getPrevious ()=0
 
virtual treenode< valuetype > * getNext ()=0
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

template<class valuetype>
class treenode< valuetype >

The treenode class is the parent class for the node contained by all rudiments treenode-based collections.

Member Function Documentation

◆ getLeftChild()

template<class valuetype >
virtual treenode<valuetype>* treenode< valuetype >::getLeftChild ( )
pure virtual

Returns the left child of this node in the tree or NULL if this node has no left child.

Implemented in avltreenode< valuetype >.

◆ getLeftHeight()

template<class valuetype >
virtual uint8_t treenode< valuetype >::getLeftHeight ( )
pure virtual

Returns the left height of this node in the tree.

Implemented in avltreenode< valuetype >.

◆ getNext()

template<class valuetype >
virtual treenode<valuetype>* treenode< valuetype >::getNext ( )
pure virtual

Returns the next node in the tree (in an in-order, depth-first traversal) or NULL if this node is the last node in the tree.

Implements nodecollectionnode< valuetype >.

Implemented in avltreenode< valuetype >.

◆ getParent()

template<class valuetype >
virtual treenode<valuetype>* treenode< valuetype >::getParent ( )
pure virtual

Returns the parent node in the tree or NULL if this node is the top-most node in the tree.

Implemented in avltreenode< valuetype >.

◆ getPrevious()

template<class valuetype >
virtual treenode<valuetype>* treenode< valuetype >::getPrevious ( )
pure virtual

Returns the previous node in the tree (in an in-order, depth-first traversal) or NULL if this node is the first node in the tree.

Implemented in avltreenode< valuetype >.

◆ getReference()

template<class valuetype >
virtual valuetype& treenode< valuetype >::getReference ( )
pure virtual

Returns a reference to the value stored in the node.

Implements nodecollectionnode< valuetype >.

Implemented in avltreenode< valuetype >.

◆ getRightChild()

template<class valuetype >
virtual treenode<valuetype>* treenode< valuetype >::getRightChild ( )
pure virtual

Returns the right child of this node in the tree or NULL if this node has no right child.

Implemented in avltreenode< valuetype >.

◆ getRightHeight()

template<class valuetype >
virtual uint8_t treenode< valuetype >::getRightHeight ( )
pure virtual

Returns the right height of this node in the tree.

Implemented in avltreenode< valuetype >.

◆ getValue()

template<class valuetype >
virtual valuetype treenode< valuetype >::getValue ( )
pure virtual

Returns the value stored in the node.

Implements nodecollectionnode< valuetype >.

Implemented in avltreenode< valuetype >.

◆ setValue()

template<class valuetype >
virtual void treenode< valuetype >::setValue ( valuetype  value)
pure virtual

Sets the value stored in the node to "value".

Implements nodecollectionnode< valuetype >.

Implemented in avltreenode< valuetype >.