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

AGenericHash< Key, ConfigData > Class Template Reference

An abstract, generic templated hash class.

#include <AGenericHash.h>

Inheritance diagram for AGenericHash< Key, ConfigData >:

FCInternalHash< Key, ConfigData > GLIBHash< Key, ConfigData > List of all members.

Public Member Functions

virtual ~AGenericHash ()
 Destructor.
virtual Key * Insert (Key *key, bool OptimizeForCaching)=0
 Insert a value. Don't add if already there.
virtual void DeleteItems ()
 Delete all the items in the hash table.

Protected Member Functions

 AGenericHash (int SizeWanted, ACompareNodesAlgorithm< Key, ConfigData > *Compare, AHashAlgorithm< Key > *Hash, DeleteHashDataEnum DeleteHashData=NO_DELETE_HASH_ITEM)
 Constructor.
virtual void Copy (AGenericHash< Key, ConfigData > *Hash)
 Copy a AGenericHash object into this AGenericHash object.

Protected Attributes

int m_Size
 Size of the hash table.
int m_NumberOfElements
 Number of elements in hash table.
ACompareNodesAlgorithm< Key,
ConfigData > * 
m_Compare
 The compare algorithm to compare values in the hash table.
AHashAlgorithm< Key > * m_Hash
 Hash algorithm for the hash table.
DeleteHashDataEnum m_DeleteHashData
 Determines how to delete the data when the hash table is deleted.

Detailed Description

template<class Key, class ConfigData>
class AGenericHash< Key, ConfigData >

Definition at line 176 of file AGenericHash.h.


Member Function Documentation

template<class Key, class ConfigData>
void AGenericHash< Key, ConfigData >::Copy AGenericHash< Key, ConfigData > *  Hash  )  [protected, virtual]
 

Parameters:
Hash is the AGenericHash object to be copied

Reimplemented in FCInternalHash< Key, ConfigData >, and FCInternalHash< FCSTalonStateData, void >.

Definition at line 245 of file AGenericHash.h.

References AGenericHash< Key, ConfigData >::m_Compare, AGenericHash< Key, ConfigData >::m_DeleteHashData, AGenericHash< Key, ConfigData >::m_Hash, AGenericHash< Key, ConfigData >::m_NumberOfElements, and AGenericHash< Key, ConfigData >::m_Size.

Referenced by FCInternalHash< Key, ConfigData >::Copy().

template<class Key, class ConfigData>
virtual Key* AGenericHash< Key, ConfigData >::Insert Key *  key,
bool  OptimizeForCaching
[pure virtual]
 

Parameters:
key is the value being inserted
OptimizeForCaching is a flag for caching optimization
Returns:
A pointer to the value inserted/found

Implemented in FCInternalHash< Key, ConfigData >, GLIBHash< Key, ConfigData >, and FCInternalHash< FCSTalonStateData, void >.

Referenced by FCHashStateStorage::CheckAndInsert(), and FCHashStackStorage::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