00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkArrayMapIterator.h,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00018 #ifndef __vtkArrayMapIterator_h 00019 #define __vtkArrayMapIterator_h 00020 00021 #include "vtkAbstractIterator.h" 00022 00023 template <class KeyType,class DataType> 00024 class vtkArrayMapIterator : public vtkAbstractIterator<KeyType,DataType> 00025 { 00026 friend class vtkArrayMap<KeyType,DataType>; 00027 virtual const char* GetClassNameInternal() const { return "vtkArrayMapIterator"; } 00028 public: 00029 00032 int GetKey(KeyType&); 00033 00036 int GetData(DataType&); 00037 00040 void InitTraversal(); 00041 00044 int IsDoneWithTraversal(); 00045 00047 void GoToNextItem(); 00048 00050 void GoToPreviousItem(); 00051 00053 void GoToFirstItem(); 00054 00056 void GoToLastItem(); 00057 00058 protected: 00059 static vtkArrayMapIterator<KeyType,DataType> *New(); 00060 00061 vtkArrayMapIterator() { 00062 this->Index = 0; 00063 } 00064 virtual ~vtkArrayMapIterator() {} 00065 00066 vtkIdType Index; 00067 00068 private: 00069 vtkArrayMapIterator(const vtkArrayMapIterator<KeyType,DataType>&); // Not implemented 00070 void operator=(const vtkArrayMapIterator<KeyType,DataType>&); // Not implemented 00071 }; 00072 00073 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION 00074 #include "vtkArrayMapIterator.txx" 00075 #endif 00076 00077 #endif 00078 00079 00080