00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkObjectBaseHashMap.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2005 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkcontainers.sourceforge.net/Copyright.html 00009 * for details. 00010 * 00011 * This software is distributed WITHOUT ANY WARRANTY; without even 00012 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 * PURPOSE. See the above copyright notice for more information. 00014 * 00015 */ 00016 #ifndef VTK_OBJECT_BASE_HASH_MAP_H_ 00017 # define VTK_OBJECT_BASE_HASH_MAP_H_ 00018 # include "vtkAssociativeContainer.h" 00019 # include "vtkObjectBaseHashMapIterator.h" // Covariant return type. 00020 00021 class vtkObjectBaseHashMapInternal; 00022 00040 class VTK_CONTAINERS_EXPORT vtkObjectBaseHashMap 00041 : public vtkAssociativeContainer 00042 { 00043 public: 00044 static vtkObjectBaseHashMap* New (void); 00045 vtkTypeRevisionMacro (vtkObjectBaseHashMap, vtkAssociativeContainer); 00046 void PrintSelf (ostream&, vtkIndent); 00047 00048 virtual vtkIdType GetSize (void) const; 00049 virtual int IsEmpty (void) const; 00050 virtual vtkIdType GetMaxSize (void) const; 00051 virtual int Clear (void); 00052 00057 virtual int Swap (vtkObjectBaseHashMap* container); 00058 00063 virtual int Copy (vtkObjectBaseHashMap* container); 00064 00069 vtkIdType GetCapacity (void) const; 00070 00073 int GetCheckUnique (void) const; 00074 void SetCheckUnique (int a); 00079 int GetCheckCase (void) const; 00080 void SetCheckCase (int a); 00090 vtkObjectBase* Find (const char* key) const; 00091 00100 int Insert (const char* key, 00101 vtkObjectBase* item); 00102 00113 int Erase (const char* key); 00114 00119 const char* FindKey (const vtkObjectBase* item); 00120 00127 const char* FindNextKey (void); 00128 00135 vtkObjectBase* Front (void) const; 00136 00141 virtual int Front (const char* & key, 00142 vtkObjectBase* & item) const; 00143 00148 vtkObjectBase* Back (void) const; 00149 00154 virtual int Back (const char* & key, 00155 vtkObjectBase* & item) const; 00159 vtkObjectBaseHashMapIterator* CreateIterator (void); 00160 00161 protected: 00171 vtkObjectBaseHashMap (void); 00172 ~vtkObjectBaseHashMap(); 00173 00174 void ReportReferences (vtkGarbageCollector*); 00175 00176 private: 00177 //BTX 00178 vtkObjectBaseHashMapInternal* Internal; 00179 00180 friend class vtkObjectBaseHashMapIterator; 00181 00184 int Swap (vtkAssociativeContainer* a) 00185 { return this->Swap(static_cast<vtkObjectBaseHashMap*>(a)); } 00186 int Copy (vtkAssociativeContainer* a) 00187 { return this->Copy(static_cast<vtkObjectBaseHashMap*>(a)); } 00189 //ETX 00190 00191 private: 00197 vtkObjectBaseHashMap (const vtkObjectBaseHashMap&); 00198 void operator= (const vtkObjectBaseHashMap&); 00200 }; 00201 00202 #endif /* VTK_OBJECT_BASE_HASH_MAP_H_ */ 00203 /* 00204 * End of: $Id: vtkObjectBaseHashMap.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $ 00205 * 00206 */