Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkObjectBasePriorityQueue.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkObjectBasePriorityQueue.h,v 1.6 2004/06/03 18:58:28 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.sourceforge.net/Copyright.html 00009 * for details. 00010 * 00011 * This software is distributed WITHOUT ANY WARRANTY; without even 00012 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 * PURPOSE. See the above copyright notice for more information. 00014 * 00015 */ 00016 #ifndef VTK_OBJECT_BASE_PRIORITY_QUEUE_H_ 00017 # define VTK_OBJECT_BASE_PRIORITY_QUEUE_H_ 00018 # include "vtkContainer.h" 00019 # include "vtkObjectBasePriorityQueueIterator.h" // Covariant return type. 00020 00021 VTK_EXTENSIONS_CONTAINERS_NAMESPACE_BEGIN 00022 00023 class vtkObjectBasePriorityQueueInternal; 00024 00038 class VTK_EXTENSIONS_CONTAINERS_EXPORT vtkObjectBasePriorityQueue 00039 : public vtkContainer 00040 { 00041 public: 00042 static vtkObjectBasePriorityQueue* New (void); 00043 vtkTypeRevisionMacro (vtkObjectBasePriorityQueue, vtkContainer); 00044 00046 vtkIdType GetSize (void) const; 00047 00049 int IsEmpty (void) const; 00050 00052 vtkIdType GetMaxSize (void) const; 00053 00055 void Clear (void); 00056 00061 virtual int Swap (vtkObjectBasePriorityQueue* container); 00062 00075 virtual int Push (vtkObjectBase* object, 00076 int priority = 0); 00077 00087 int Pop (void); 00088 00093 virtual vtkObjectBase* Top (void) const; 00097 vtkObjectBasePriorityQueueIterator* CreateIterator (void); 00098 00099 protected: 00100 vtkObjectBasePriorityQueue (void); 00101 ~vtkObjectBasePriorityQueue(); 00102 00103 private: 00104 //BTX 00105 vtkObjectBasePriorityQueueInternal* Internal; 00106 00107 friend class vtkObjectBasePriorityQueueIterator; 00108 00116 vtkObjectBase* Front (void) const; 00117 00123 vtkObjectBase* Back (void) const; 00128 int Swap (vtkContainer* a) 00129 { return this->Swap(static_cast<vtkObjectBasePriorityQueue*>(a)); } 00131 //ETX 00132 00133 private: 00139 vtkObjectBasePriorityQueue (const vtkObjectBasePriorityQueue&); 00140 void operator= (const vtkObjectBasePriorityQueue&); 00142 }; 00143 00144 // ---------------------------------------------------------------------------- 00145 inline vtkObjectBase* 00146 vtkObjectBasePriorityQueue::Top (void) const 00147 { 00148 return this->Front(); 00149 } 00150 00151 VTK_EXTENSIONS_CONTAINERS_NAMESPACE_END 00152 00153 #endif /* VTK_OBJECT_BASE_PRIORITY_QUEUE_H_ */ 00154 /* 00155 * End of: $Id: vtkObjectBasePriorityQueue.h,v 1.6 2004/06/03 18:58:28 xpxqx Exp $. 00156 * 00157 */

Generated on Tue Aug 10 03:37:41 2004 for vtkExtensions by doxygen 1.3.7