BTreeNode_t< T, K > Class Template Reference

Template binary tree element base class. More...

#include <UTLists.h>

List of all members.

Public Member Functions

T * Next () const
T * Prev () const
bool operator< (const T &other)
bool operator<= (const T &other)
bool operator> (const T &other)
bool operator>= (const T &other)
bool operator== (const T &other)
bool operator< (K key)
bool operator<= (K key)
bool operator> (K key)
bool operator>= (K key)
bool operator== (K key)
int ChildNodesDepth () const
void ValidateChildNodeDepth () const

Protected Member Functions

 BTreeNode_t ()

Detailed Description

template<class T, class K>
class BTreeNode_t< T, K >

Template binary tree element base class. The template type T must inherit from BTreeNode_t <class T, class K> where T is the node type and K is the comparison key, allowing template type T to be added to a BTree_t <class T, class K> or OwnedBTree_t <class T, class K>.

Definition at line 429 of file UTLists.h.


Constructor & Destructor Documentation

template<class T , class K >
BTreeNode_t< T, K >::BTreeNode_t (  )  [inline, protected]

Constructor.

Definition at line 2638 of file UTLists.h.


Member Function Documentation

template<class T , class K >
T * BTreeNode_t< T, K >::Next (  )  const [inline]

Returns the item after this one in the tree, or NULL if there are no more items in the tree. This is not necessarily m_next, because m_next may contain an m_prev child.

Definition at line 2649 of file UTLists.h.

template<class T , class K >
T * BTreeNode_t< T, K >::Prev (  )  const [inline]

Returns the item before this one in the tree, or NULL if this was the first item in the tree. This is not necessarily m_prev, because m_prev may contain an m_next child.

Definition at line 2674 of file UTLists.h.

template<class T, class K >
bool BTreeNode_t< T, K >::operator< ( const T &  other  )  [inline]

Compares the position of two nodes by their keys. class T must implement a Compare(K key) const or Compare(const K& key) const function which returns a signed integer. If this comes before other (based on its key), T::Compare should return a negative number. If this comes after other, T::Compare should return a positive number. If this equals other, T::Compare should return 0.

Definition at line 2699 of file UTLists.h.

template<class T, class K >
bool BTreeNode_t< T, K >::operator<= ( const T &  other  )  [inline]

Compares the position of two nodes by their keys using T::Compare(K key) as documented for operator < (const T& other).

Definition at line 2707 of file UTLists.h.

template<class T, class K >
bool BTreeNode_t< T, K >::operator> ( const T &  other  )  [inline]

Compares the position of two nodes by their keys using T::Compare(K key) as documented for operator < (const T& other).

Definition at line 2715 of file UTLists.h.

template<class T, class K >
bool BTreeNode_t< T, K >::operator>= ( const T &  other  )  [inline]

Compares the position of two nodes by their keys using T::Compare(K key) as documented for operator < (const T& other).

Definition at line 2723 of file UTLists.h.

template<class T, class K >
bool BTreeNode_t< T, K >::operator== ( const T &  other  )  [inline]

Compares the position of two nodes by their keys using T::Compare(K key) as documented for operator < (const T& other).

Definition at line 2731 of file UTLists.h.

template<class T, class K>
bool BTreeNode_t< T, K >::operator< ( key  )  [inline]

Compares the position of this node with a key. class T must implement a Compare(K key) const or Compare(const K& key) const function which returns a signed integer. If this comes before key, T::Compare should return a negative number. If this comes after key, T::Compare should return a positive number. If this equals key, T::Compare should return 0.

Definition at line 2739 of file UTLists.h.

template<class T, class K>
bool BTreeNode_t< T, K >::operator<= ( key  )  [inline]

Compares the position of this node with a key using T::Compare(K) as documented for operator < (K key).

Definition at line 2747 of file UTLists.h.

template<class T, class K>
bool BTreeNode_t< T, K >::operator> ( key  )  [inline]

Compares the position of this node with a key using T::Compare(K) as documented for operator < (K key).

Definition at line 2755 of file UTLists.h.

template<class T, class K>
bool BTreeNode_t< T, K >::operator>= ( key  )  [inline]

Compares the position of this node with a key using T::Compare(K) as documented for operator < (K key).

Definition at line 2763 of file UTLists.h.

template<class T, class K>
bool BTreeNode_t< T, K >::operator== ( key  )  [inline]

Compares the position of this node with a key using T::Compare(K) as documented for operator < (K key).

Definition at line 2771 of file UTLists.h.

template<class T , class K >
int BTreeNode_t< T, K >::ChildNodesDepth (  )  const [inline]

For BTree performance diagnostics.

Definition at line 2779 of file UTLists.h.

template<class T , class K >
void BTreeNode_t< T, K >::ValidateChildNodeDepth (  )  const [inline]

For BTree unit testing.

Definition at line 2787 of file UTLists.h.


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

Generated on Tue Dec 14 22:35:06 2010 for UT library by  doxygen 1.6.1