summaryrefslogtreecommitdiff
path: root/utils/HashTable.h
diff options
context:
space:
mode:
authorsc2000-12-22 09:30:36 +0000
committersc2000-12-22 09:30:36 +0000
commitf559679714fbcb3774409122285ae785b351ade7 (patch)
tree0e687b725c72505f6cef7ec22f28e56b07957d43 /utils/HashTable.h
parent97487c4585cbf2049c2b4a5ad86c8e15f829975d (diff)
downloadivy-league-f559679714fbcb3774409122285ae785b351ade7.zip
ivy-league-f559679714fbcb3774409122285ae785b351ade7.tar.gz
ivy-league-f559679714fbcb3774409122285ae785b351ade7.tar.bz2
ivy-league-f559679714fbcb3774409122285ae785b351ade7.tar.xz
Added method RemoveOne
Diffstat (limited to 'utils/HashTable.h')
-rw-r--r--utils/HashTable.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/utils/HashTable.h b/utils/HashTable.h
index 6586efe..7fb2e84 100644
--- a/utils/HashTable.h
+++ b/utils/HashTable.h
@@ -1,17 +1,17 @@
/*
- * CENA C++ Utilities
+ * Ivy League
*
- * by Stephane Chatty
+ * plain and generic hash tables and dictionnaries
+ * (Original C version by Michel Beaudouin-Lafon)
*
- * Copyright 1991-1997
+ * Copyright 1991-2000
* Laboratoire de Recherche en Informatique (LRI)
* Centre d'Etudes de la Navigation Aerienne (CENA)
*
- * plain and generic hash tables and dictionnaries
- * (Original C version by Michel Beaudouin-Lafon)
+ * by Stephane Chatty
*
* $Id$
- * $CurLog$
+ *
*/
#ifndef HashTable_H_
@@ -91,6 +91,7 @@ static unsigned int HashPtr (const void*, int);
IvlHashCell* Add (const void*, int* = 0);
IvlHashCell* Get (const void*);
IvlHashItem* Remove (const void*, int* = 0);
+ IvlHashItem* RemoveOne ();
void Clear ();
void Resize (int);
inline int GetSize () const { return Size; }
@@ -178,6 +179,7 @@ inline ~IvlHashTableOf () {}
inline IvlHashCellOf<ITEM>* Add (const void* key, int* found = 0) { return (IvlHashCellOf<ITEM>*) IvlHashTable::Add (key, found); }
inline IvlHashCellOf<ITEM>* Get (const void* key) { return (IvlHashCellOf<ITEM>*) IvlHashTable::Get (key); }
inline ITEM* Remove (const void* key, int* found = 0) { return (ITEM*) IvlHashTable::Remove (key, found); }
+inline ITEM* RemoveOne () { return (ITEM*) IvlHashTable::RemoveOne (); }
inline IvlHashCellRefOf<ITEM> operator [] (const void* key) const { return IvlHashCellRefOf<ITEM> (*this, key); }
};
@@ -188,6 +190,7 @@ inline ~IvlDictionnaryOf () {}
inline IvlHashCellOf<ITEM>* Add (const void* key, int* found = 0) { return (IvlHashCellOf<ITEM>*) IvlDictionnary::Add (key, found); }
inline IvlHashCellOf<ITEM>* Get (const void* key) { return (IvlHashCellOf<ITEM>*) IvlDictionnary::Get (key); }
inline ITEM* Remove (const void* key, int* found = 0) { return (ITEM*) IvlDictionnary::Remove (key, found); }
+inline ITEM* RemoveOne () { return (ITEM*) IvlDictionnary::RemoveOne (); }
inline operator const IvlHashTableOf<ITEM>& () const { return *(const IvlHashTableOf<ITEM>*) this; }
inline IvlHashCellRefOf<ITEM> operator [] (const char* key) const { return IvlHashCellRefOf<ITEM> (*(const IvlHashTableOf<ITEM>*)this, key); }
};
@@ -199,6 +202,7 @@ inline ~IvlHashedArrayOf () {}
inline IvlHashCellOf<ITEM>* Add (int key, int* found = 0) { return (IvlHashCellOf<ITEM>*) IvlHashTable::Add ((void*)key, found); }
inline IvlHashCellOf<ITEM>* Get (int key) { return (IvlHashCellOf<ITEM>*) IvlHashTable::Get ((void*)key); }
inline ITEM* Remove (int key, int* found = 0) { return (ITEM*) IvlHashTable::Remove ((void*) key, found); }
+inline ITEM* RemoveOne () { return (ITEM*) IvlHashTable::RemoveOne (); }
inline operator const IvlHashTableOf<ITEM>& () const { return *(const IvlHashTableOf<ITEM>*) this; }
inline IvlHashCellRefOf<ITEM> operator [] (int key) const { return IvlHashCellRefOf<ITEM> (*(const IvlHashTableOf<ITEM>*)this, (void*)key); }
};