00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkQueue.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 __vtkQueue_h 00019 #define __vtkQueue_h 00020 00021 #include "vtkVector.h" 00022 00023 template <class DType> class vtkQueueIterator; 00024 00025 template <class DType> 00026 class vtkQueue : public vtkVector<DType> 00027 { 00028 friend class vtkQueueIterator<DType>; 00029 virtual const char* GetClassNameInternal() const { return "vtkQueue"; } 00030 public: 00031 typedef vtkVector<DType> Superclass; 00032 00033 static vtkQueue<DType> *New(); 00034 00036 vtkQueueIterator<DType>* NewQueueIterator(); 00037 00039 int EnqueueItem(DType a); 00040 00042 int DequeueItem(); 00043 00046 int GetDequeueItem(DType &a); 00047 00049 virtual void DebugList(); 00050 00052 void MakeEmpty(); 00053 00054 protected: 00055 vtkQueue(); 00056 virtual ~vtkQueue(); 00057 00058 vtkIdType Start; 00059 vtkIdType End; 00060 00061 private: 00062 vtkQueue(const vtkQueue<DType>&); // Not implemented 00063 void operator=(const vtkQueue<DType>&); // Not implemented 00064 }; 00065 00066 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION 00067 #include "vtkQueue.txx" 00068 #endif 00069 00070 #endif 00071 00072 00073