00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkQueueIterator.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 __vtkQueueIterator_h 00019 #define __vtkQueueIterator_h 00020 00021 #include "vtkAbstractIterator.h" 00022 00023 template <class DType> class vtkLinkedList; 00024 template <class DType> class vtkLinkedListNode; 00025 00026 template <class DType> 00027 class vtkQueueIterator : public vtkAbstractIterator<vtkIdType,DType> 00028 { 00029 friend class vtkQueue<DType>; 00030 virtual const char* GetClassNameInternal() const { return "vtkQueueIterator"; } 00031 00032 public: 00033 00036 int GetKey(vtkIdType&); 00037 00040 int GetData(DType&); 00041 00044 int SetData(const DType&); 00045 00048 void InitTraversal(); 00049 00052 int IsDoneWithTraversal(); 00053 00055 void GoToNextItem(); 00056 00058 void GoToPreviousItem(); 00059 00061 void GoToFirstItem(); 00062 00064 void GoToLastItem(); 00065 00066 protected: 00067 static vtkQueueIterator<DType> *New(); 00068 00069 vtkQueueIterator() { 00070 this->Index = -1; 00071 this->Number = 0; 00072 } 00073 virtual ~vtkQueueIterator() {} 00074 00075 vtkIdType Index; 00076 vtkIdType Number; 00077 00078 private: 00079 vtkQueueIterator(const vtkQueueIterator&); // Not implemented 00080 void operator=(const vtkQueueIterator&); // Not implemented 00081 }; 00082 00083 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION 00084 #include "vtkQueueIterator.txx" 00085 #endif 00086 00087 #endif 00088 00089 00090