From 970610ca262632089e28c2dca33ff61eb1e5f749 Mon Sep 17 00:00:00 2001 From: chatty Date: Fri, 4 Oct 1996 09:20:40 +0000 Subject: Added CcuHashCellIterOf --- utils/HashTable.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'utils/HashTable.h') diff --git a/utils/HashTable.h b/utils/HashTable.h index 5a0ab29..92a70ce 100644 --- a/utils/HashTable.h +++ b/utils/HashTable.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1991-1995 + * Copyright 1991-1996 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -181,8 +181,7 @@ inline operator ITEM* () { return (ITEM*) (CcuHashCellRef::operator CcuHashIte template class CcuHashTableOf : public CcuHashTable { public: -inline CcuHashTableOf (unsigned int size, HASH_F hash = 0, HCP_F cp = 0, HDEL_F del = 0, HCMP_F cmp= 0) - : CcuHashTable (size, hash, cp, del, cmp) {} +inline CcuHashTableOf (unsigned int size, HASH_F hash = 0, HCP_F cp = 0, HDEL_F del = 0, HCMP_F cmp= 0) : CcuHashTable (size, hash, cp, del, cmp) {} inline ~CcuHashTableOf () {} inline CcuHashCellOf* Add (const void* key, int* found = 0) { return (CcuHashCellOf*) CcuHashTable::Add (key, found); } inline CcuHashCellOf* Get (const void* key) { return (CcuHashCellOf*) CcuHashTable::Get (key); } @@ -210,6 +209,17 @@ inline CcuHashIterOf& operator ++ () { return (CcuHashIterOf&)(this- inline ITEM* operator * () const { return (ITEM*) (CcuHashIter::operator * ()); } }; +template class CcuHashCellIterOf : public CcuHashCellIter { +public: +inline CcuHashCellIterOf (const CcuHashTableOf& t) : CcuHashCellIter (t) { } +inline ~CcuHashCellIterOf () {} +inline CcuHashCellIterOf& operator ++ () { return (CcuHashCellIterOf&)(this->CcuHashCellIter::operator ++ ()); } +#ifndef CPLUS_BUG16 +inline CcuHashCellIterOf operator ++ (int i) { return *(CcuHashCellIterOf*)&(this->CcuHashCellIter::operator ++ (i)); } +#endif +inline CcuHashCellOf* operator * () const { return (CcuHashCellOf*) (CcuHashCellIter::operator * ()); } +}; + #endif /* CPLUS_BUG19 */ #endif /* HashTable_H_ */ -- cgit v1.1