Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

AGenericTree< Data, ConfigData > Class Template Reference

An abstract, generic templated tree class.

#include <AGenericTree.h>

Inheritance diagram for AGenericTree< Data, ConfigData >:

AVLRedBlackTree< Data, ConfigData > AVLTree< Data, ConfigData > GLIBTree< Data, ConfigData > RedBlackTree< Data, ConfigData > List of all members.

Public Member Functions

virtual ~AGenericTree ()
 Destructor.
virtual Data * Search (Data *NodeData, bool *NodeInserted)=0
 Find a data item. If not found, insert it.
virtual Data * Find (Data *NodeData)=0
 Find a data item. If not found, return NULL.
virtual void DeleteTree ()
 Some trees can't destory themselves with a destructor, use this function instead.

Protected Member Functions

 AGenericTree (ACompareNodesAlgorithm< Data, ConfigData > *CompareNodes, DeleteTreeDataEnum DeleteTreeData=NO_DELETE_TREE_ITEM, ConfigData *pConfigData=NULL)
 Constructor.

Protected Attributes

ACompareNodesAlgorithm< Data,
ConfigData > * 
m_CompareNodes
 The compare algorithm to compare nodes in the tree.
ConfigData * m_ConfigData
 Configuration data (if necessary) for the compare algorithms.
DeleteTreeDataEnum m_DeleteTreeData
 Determines how to delete the data when the hash table is deleted.

Detailed Description

template<class Data, class ConfigData>
class AGenericTree< Data, ConfigData >

Definition at line 19 of file AGenericTree.h.


Member Function Documentation

template<class Data, class ConfigData>
virtual Data* AGenericTree< Data, ConfigData >::Find Data *  NodeData  )  [pure virtual]
 

Parameters:
NodeData is the value being searched for.
Returns:
A pointer to the data found. NULL if data isn't found.

Implemented in AVLRedBlackTree< Data, ConfigData >, AVLTree< Data, ConfigData >, GLIBTree< Data, ConfigData >, and RedBlackTree< Data, ConfigData >.

template<class Data, class ConfigData>
virtual Data* AGenericTree< Data, ConfigData >::Search Data *  NodeData,
bool *  NodeInserted
[pure virtual]
 

Parameters:
NodeData is the value being searched for.
NodeInserted is a flag to determine if the data was inserted
Returns:
A pointer to the data found. NULL if data is inserted

Implemented in AVLRedBlackTree< Data, ConfigData >, AVLTree< Data, ConfigData >, GLIBTree< Data, ConfigData >, and RedBlackTree< Data, ConfigData >.

Referenced by FCTreeStateStorage::CheckAndInsert(), and FCTreeStackStorage::Insert().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 11:20:16 2005 for Cpp Freecell Solver by  doxygen 1.4.4