Source of HashedEntry.h


  1: //  Created by Frank M. Carrano and Tim Henry.
  2: //  Copyright (c) 2013 __Pearson Education__. All rights reserved.

  4: // Listing 18-5.

  6: /** A class of entry objects for a hashing implementation of the
  7:     ADT dictionary.
  8:  @file HashedEntry.h */
  9:  
 10: #ifndef _HASHED_ENTRY
 11: #define _HASHED_ENTRY

 13: #include "Entry.h"

 15: template<class KeyType, class ItemType>
 16: class HashedEntry : public Entry<KeyType, ItemType>
 17: {
 18: private:
 19:    HashedEntry<KeyType, ItemType>* nextPtr;
 20:    
 21: public:
 22:    HashedEntry();
 23:    HashedEntry(ItemType newEntry, KeyType searchKey);
 24:    HashedEntry(ItemType newEntry, KeyType searchKey,
 25:                HashedEntry<KeyType, ItemType>* nextEntryPtr);
 26:    void setNext(HashedEntry<KeyType, ItemType>* nextEntryPtr);
 27:    HashedEntry<KeyType, ItemType>* getNext() const;
 28: }; // end HashedEntry

 30: #include "HashedEntry.cpp"
 31: #endif