00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkObjectBaseMap.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_MAP_H_ 00017 # define VTK_OBJECT_BASE_MAP_H_ 00018 # include "vtkAssociativeContainer.h" 00019 # include "vtkObjectBaseMapIterator.h" // Covariant return type. 00020 00021 class vtkObjectBaseMapInternal; 00022 00043 class VTK_CONTAINERS_EXPORT vtkObjectBaseMap : public vtkAssociativeContainer 00044 { 00045 public: 00046 static vtkObjectBaseMap* New (void); 00047 vtkTypeRevisionMacro (vtkObjectBaseMap, vtkAssociativeContainer); 00048 void PrintSelf (ostream&, vtkIndent); 00049 00050 virtual vtkIdType GetSize (void) const; 00051 virtual int IsEmpty (void) const; 00052 virtual vtkIdType GetMaxSize (void) const; 00053 virtual int Clear (void); 00054 00059 virtual int Swap (vtkObjectBaseMap* container); 00060 00065 virtual int Copy (vtkObjectBaseMap* container); 00066 00071 vtkIdType GetCapacity (void) const; 00072 00080 vtkObjectBase* Find (const char* key) const; 00081 00090 virtual int Insert (const char* key, 00091 vtkObjectBase* item); 00092 00103 int Erase (const char* key); 00104 00109 const char* FindKey (const vtkObjectBase* item); 00110 00117 const char* FindNextKey (void); 00118 00125 vtkObjectBase* Front (void) const; 00126 00131 virtual int Front (const char* & key, 00132 vtkObjectBase* & item) const; 00133 00138 vtkObjectBase* Back (void) const; 00139 00144 virtual int Back (const char* & key, 00145 vtkObjectBase* & item) const; 00149 vtkObjectBaseMapIterator* CreateIterator (void); 00150 00151 protected: 00152 vtkObjectBaseMap (void); 00153 ~vtkObjectBaseMap(); 00154 00155 void ReportReferences (vtkGarbageCollector*); 00156 00157 private: 00158 //BTX 00159 vtkObjectBaseMapInternal* Internal; 00160 00161 friend class vtkObjectBaseMapIterator; 00162 00165 int Swap (vtkAssociativeContainer* a) 00166 { return this->Swap(static_cast<vtkObjectBaseMap*>(a)); } 00167 int Copy (vtkAssociativeContainer* a) 00168 { return this->Copy(static_cast<vtkObjectBaseMap*>(a)); } 00170 //ETX 00171 00172 private: 00178 vtkObjectBaseMap (const vtkObjectBaseMap&); 00179 void operator= (const vtkObjectBaseMap&); 00181 }; 00182 00183 #endif /* VTK_OBJECT_BASE_MAP_H_ */ 00184 /* 00185 * End of: $Id: vtkObjectBaseMap.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $. 00186 * 00187 */