| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 Computer Graphics Systems Group at the 00004 Hasso-Plattner-Institute, Potsdam, Germany. 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 // $Id: idhashtable.h 6414 2008-06-30 04:54:36Z Haik_Lorenz $ 00018 // $Date: 2008-06-30 06:54:36 +0200 (Mon, 30 Jun 2008) $ 00019 // $Revision: 6414 $ 00020 // $State$ 00021 // $Author: Haik_Lorenz $ 00022 // 00023 // $Log$ 00024 // Revision 1.8 2004/11/09 15:04:55 kirsch 00025 // further changes to class comments due to doxygen 00026 // 00027 // Revision 1.7 2004/11/03 10:58:28 saar 00028 // Class comment changed (Doxygen style) 00029 // 00030 // Revision 1.6 2004/03/12 16:28:39 baumann 00031 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00032 // 00033 // Revision 1.5 2003/11/07 14:19:24 kirsch 00034 // removed leading underscore from include guards 00035 // 00036 // Revision 1.4 2002/09/19 14:19:03 kirsch 00037 // do not dynamically allocate dict_ anymore 00038 // 00039 // Revision 1.3 2002/08/06 16:24:01 baumann 00040 // VRS_API removed for template classes 00041 // 00042 // Revision 1.2 2002/07/02 15:23:48 baumann 00043 // non-persistent containers now have the prefix NonPersistent, e.g. NonPersistentArray<T> 00044 // persistent containers now have no prefix, e.g. Array<T> 00045 // 00046 // Revision 1.1 2002/03/04 12:03:54 kersting 00047 // directory structure changes 00048 // 00049 // Revision 1.9 2002/03/03 21:44:24 kosta 00050 // VRS_TYPEINFO-macro rewritten 00051 // 00052 // Revision 1.8 2002/02/20 18:43:04 kosta 00053 // changed MAM/VRS to VRS 00054 // 00055 // Revision 1.7 2002/02/19 10:34:08 kosta 00056 // undone all changes since 2002-02-15 00057 // 00058 // Revision 1.4 2002/01/15 16:25:53 kosta 00059 // macros rewritten for a better namespace support 00060 // 00061 // Revision 1.3 2001/11/13 16:36:30 kirsch 00062 // changed line feed to unix style (removed control-M) 00063 // 00064 // Revision 1.2 2001/07/06 21:22:09 kosta 00065 // order of include statements changed in order to avoid some nesty warnings 00066 // 00067 // Revision 1.1.1.1 2001/06/08 08:09:20 kirsch 00068 // imported alpha-version by olli 00069 // 00070 00071 00072 #ifndef VRS_IDHASHTABLE_H 00073 #define VRS_IDHASHTABLE_H 00074 00075 #include <vrs/container/dictionary.h> 00076 00077 namespace VRS { 00078 00080 00085 template<class T> 00086 class IDHashTable : public SharedObj { 00087 public: 00088 00089 IDHashTable(unsigned int numElements = 17); 00090 00091 bool insert(const ID& id, T* t); 00092 00093 T* find(const ID& id) const; 00094 T* findForce(const ID& id); 00095 00096 VRS_TYPEINFO(IDHashTable, SharedObj); 00097 00098 private: 00099 NonPersistentDictionary<ID, SO<T> > dict_; 00100 }; 00101 00102 } // namespace VRS 00103 00104 #include <vrs/container/idhashtable.tli> 00105 00106 #endif // VRS_IDHASHTABLE_H