00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkLinkedListIterator.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 __vtkLinkedListIterator_h 00019 #define __vtkLinkedListIterator_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 vtkLinkedListIterator : public vtkAbstractIterator<vtkIdType,DType> 00028 { 00029 friend class vtkLinkedList<DType>; 00030 virtual const char* GetClassNameInternal() const { return "vtkLinkedListIterator"; } 00031 00032 public: 00035 int GetKey(vtkIdType&); 00036 00039 int GetData(DType&); 00040 00043 void InitTraversal(); 00044 00047 int IsDoneWithTraversal(); 00048 00050 void GoToNextItem(); 00051 00055 void GoToPreviousItem(); 00056 00058 void GoToFirstItem(); 00059 00061 void GoToLastItem(); 00062 00063 protected: 00064 static vtkLinkedListIterator<DType> *New(); 00065 00066 vtkLinkedListIterator() { 00067 this->Pointer = 0; 00068 } 00069 virtual ~vtkLinkedListIterator() {} 00070 00071 vtkLinkedListNode<DType> *Pointer; 00072 00073 private: 00074 vtkLinkedListIterator(const vtkLinkedListIterator&); // Not implemented 00075 void operator=(const vtkLinkedListIterator&); // Not implemented 00076 }; 00077 00078 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION 00079 #include "vtkLinkedListIterator.txx" 00080 #endif 00081 00082 #endif 00083 00084 00085