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.3 2005/06/24 23:17:16 xpxqx Exp $
00004  *
00005  * Copyright (c) 2005 Sean McInerney
00006  * All rights reserved.
00007  *
00008  * See Copyright.txt or http://vtkcontainers.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 "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   //BTX
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   //ETX
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 /* VTK_OBJECT_BASE_PRIORITY_QUEUE_H_ */
00146 /* 
00147  * End of: $Id: vtkObjectBasePriorityQueue.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $.
00148  * 
00149  */

Generated on Thu Jul 14 14:39:38 2005 for vtkContainers by doxygen 1.3.6