Rudiments
Public Member Functions | List of all members
avltreenode< valuetype > Class Template Reference

#include <avltree.h>

Inherits treenode< valuetype >.

Public Member Functions

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

Detailed Description

template<class valuetype>
class avltreenode< valuetype >

The avltreenode class stores the values that compose a avltree.

Constructor & Destructor Documentation

◆ avltreenode()

Creates an instance of the avltreenode class that stores value "value".

◆ ~avltreenode()

template<class valuetype >
avltreenode< valuetype >::~avltreenode ( )
inline

Deletes this instance of the avltreenode class.

Member Function Documentation

◆ getLeftChild()

template<class valuetype >
treenode< valuetype > * avltreenode< valuetype >::getLeftChild ( )
inlinevirtual

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

Implements treenode< valuetype >.

◆ getLeftHeight()

template<class valuetype >
uint8_t avltreenode< valuetype >::getLeftHeight ( )
inlinevirtual

Returns the left height of this node in the avltree.

Implements treenode< valuetype >.

◆ getNext()

template<class valuetype >
treenode< valuetype > * avltreenode< valuetype >::getNext ( )
inlinevirtual

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

Implements treenode< valuetype >.

◆ getParent()

template<class valuetype >
treenode< valuetype > * avltreenode< valuetype >::getParent ( )
inlinevirtual

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

Implements treenode< valuetype >.

◆ getPrevious()

template<class valuetype >
treenode< valuetype > * avltreenode< valuetype >::getPrevious ( )
inlinevirtual

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

Implements treenode< valuetype >.

◆ getReference()

template<class valuetype >
valuetype & avltreenode< valuetype >::getReference ( )
inlinevirtual

Returns a reference to the value stored in the node.

Implements treenode< valuetype >.

◆ getRightChild()

template<class valuetype >
treenode< valuetype > * avltreenode< valuetype >::getRightChild ( )
inlinevirtual

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

Implements treenode< valuetype >.

◆ getRightHeight()

template<class valuetype >
uint8_t avltreenode< valuetype >::getRightHeight ( )
inlinevirtual

Returns the right height of this node in the avltree.

Implements treenode< valuetype >.

◆ getValue()

template<class valuetype >
valuetype avltreenode< valuetype >::getValue ( )
inlinevirtual

Returns the value stored in the node.

Implements treenode< valuetype >.

◆ setValue()

template<class valuetype >
void avltreenode< valuetype >::setValue ( valuetype value)
inlinevirtual

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

Implements treenode< valuetype >.