00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef VTK_OBJECT_BASE_PRIORITY_QUEUE_H_
00017 # define VTK_OBJECT_BASE_PRIORITY_QUEUE_H_
00018 # include "vtkAdaptorContainer.h"
00019
00020 class vtkObjectBasePriorityQueueInternal;
00021
00043 class VTK_CONTAINERS_EXPORT vtkObjectBasePriorityQueue
00044 : public vtkAdaptorContainer
00045 {
00046 public:
00047 static vtkObjectBasePriorityQueue* New (void);
00048 vtkTypeRevisionMacro (vtkObjectBasePriorityQueue, vtkAdaptorContainer);
00049 void PrintSelf (ostream&, vtkIndent);
00050
00051 virtual vtkIdType GetSize (void) const;
00052 virtual int IsEmpty (void) const;
00053 virtual vtkIdType GetMaxSize (void) const;
00054 virtual int Clear (void);
00055
00060 virtual int Swap (vtkObjectBasePriorityQueue* container);
00061
00066 virtual int Copy (vtkObjectBasePriorityQueue* container);
00067
00077 virtual int Push (vtkObjectBase* item,
00078 int priority = 0);
00079
00087 int Pop (void);
00088
00090 virtual vtkObjectBase* Top (void) const;
00093 protected:
00094 vtkObjectBasePriorityQueue (void);
00095 ~vtkObjectBasePriorityQueue();
00096
00097 void ReportReferences (vtkGarbageCollector*);
00098
00099 private:
00100
00101 vtkObjectBasePriorityQueueInternal* Internal;
00102
00109 vtkObjectBase* Front (void) const;
00110
00115 vtkObjectBase* Back (void) const;
00120 int Swap (vtkAdaptorContainer* a)
00121 { return this->Swap(static_cast<vtkObjectBasePriorityQueue*>(a)); }
00122 int Copy (vtkAdaptorContainer* a)
00123 { return this->Copy(static_cast<vtkObjectBasePriorityQueue*>(a)); }
00125
00126
00127 private:
00133 vtkObjectBasePriorityQueue (const vtkObjectBasePriorityQueue&);
00134 void operator= (const vtkObjectBasePriorityQueue&);
00136 };
00137
00138
00139 inline vtkObjectBase*
00140 vtkObjectBasePriorityQueue::Top (void) const
00141 {
00142 return this->Front();
00143 }
00144
00145 #endif
00146
00147
00148
00149