00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00028 #include "vtkAbstractMap.h"
00029
00030 #ifndef __vtkArrayMap_h
00031 #define __vtkArrayMap_h
00032
00033 template<class DataType> class vtkVector;
00034 template<class KeyType, class DataType> class vtkArrayMapIterator;
00035
00036 template<class KeyType, class DataType>
00037 class vtkArrayMap : public vtkAbstractMap<KeyType,DataType>
00038 {
00039 friend class vtkArrayMapIterator<KeyType,DataType>;
00040 virtual const char* GetClassNameInternal() const {return "vtkArrayMap";}
00041 public:
00042 typedef vtkAbstractMap<KeyType,DataType> Superclass;
00043 typedef vtkArrayMapIterator<KeyType,DataType> IteratorType;
00044
00045
00046
00047
00048
00049 static vtkArrayMap<KeyType,DataType> *New();
00050
00053 vtkArrayMapIterator<KeyType,DataType> *NewIterator();
00054
00057 int SetItem(const KeyType& key, const DataType& data);
00058
00061 int RemoveItem(const KeyType& key);
00062
00064 void RemoveAllItems();
00065
00068 int GetItem(const KeyType& key, DataType& data);
00069
00073 vtkIdType GetNumberOfItems() const;
00074
00077 int IsItemPresent(const KeyType& key);
00078
00079 void DebugList();
00080
00081 protected:
00082 vtkArrayMap() { this->Array = 0; }
00083 virtual ~vtkArrayMap();
00084
00086
00087 virtual vtkAbstractMapItem<KeyType,DataType>
00088 *FindDataItem(const KeyType key);
00090
00091 vtkVector< vtkAbstractMapItem<KeyType,DataType>* > *Array;
00092
00093 private:
00094 vtkArrayMap(const vtkArrayMap<KeyType,DataType>&);
00095 void operator=(const vtkArrayMap<KeyType,DataType>&);
00096 };
00097
00098 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
00099 #include "vtkArrayMap.txx"
00100 #endif
00101
00102 #endif
00103
00104
00105