1 /* $XConsortium: HashTableItemBase.h /main/1 1996/07/29 16:53:09 cde-hp $ */
2 // Copyright (c) 1994 James Clark
3 // See the file COPYING for copying permission.
5 #ifndef HashTableItemBase_INCLUDED
6 #define HashTableItemBase_INCLUDED 1
8 // All hash tables with the same type of key share object code.
9 // The cost of this is a virtual dtor in HashTableItemBase.
12 namespace SP_NAMESPACE {
16 class HashTableItemBase {
18 HashTableItemBase(const K &k);
19 virtual ~HashTableItemBase();
20 virtual HashTableItemBase<K> *copy() const = 0;
25 struct HashTableKeyFunction {
26 static inline const K &key(const HashTableItemBase<K> &obj) {
35 #endif /* not HashTableItemBase_INCLUDED */
37 #ifdef SP_DEFINE_TEMPLATES
38 #include "HashTableItemBase.C"