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

vtkObjectBasePriorityQueue Class Reference

#include <vtkObjectBasePriorityQueue.h>

Inheritance diagram for vtkObjectBasePriorityQueue:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBasePriorityQueue:

Collaboration graph
[legend]
List of all members.

Detailed Description

A priority queue container for objects.

A priority queue is an adaptor that provides a restricted subset of Container functionality: it provides insertion of items, and inspection and removal of the top item. It is guaranteed that the top item is the highest priority item in the priority queue, where priority is determined by an associated value.

Note:
Priority queue does not allow iteration through its items. Priority queue is a container adaptor, meaning that it is implemented on top of some underlying container type. By default that internal underlying type is set.
Author:
Sean McInerney
Version:
Revision
1.3
Date:
Date
2005/06/24 23:17:16
See also:
vtkObjectBase

Definition at line 43 of file vtkObjectBasePriorityQueue.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBasePriorityQueue, vtkAdaptorContainer)
void PrintSelf (ostream &, vtkIndent)
virtual vtkIdType GetSize (void) const
 Returns the number of items in the container.

virtual int IsEmpty (void) const
 Returns true if this container is empty.

virtual vtkIdType GetMaxSize (void) const
 Returns the maximum size of this container.

virtual int Clear (void)
 Erase ALL items in the container.

virtual int Swap (vtkObjectBasePriorityQueue *container)
 Swaps items of this container with those of the specified container.

virtual int Copy (vtkObjectBasePriorityQueue *container)
 Copy all items from the specified container into this container.

Priority Queue Operations
virtual int Push (vtkObjectBase *item, int priority=0)
 Add an item to the end of the queue with an optional priority value.

int Pop (void)
 Removes the first item in this queue.

virtual vtkObjectBaseTop (void) const
 Returns the first item in this queue on success, NULL otherwise.


Static Public Member Functions

vtkObjectBasePriorityQueueNew (void)

Protected Member Functions

 vtkObjectBasePriorityQueue (void)
 ~vtkObjectBasePriorityQueue ()
void ReportReferences (vtkGarbageCollector *)


Constructor & Destructor Documentation

vtkObjectBasePriorityQueue::vtkObjectBasePriorityQueue void   )  [protected]
 

vtkObjectBasePriorityQueue::~vtkObjectBasePriorityQueue  )  [protected]
 


Member Function Documentation

virtual int vtkObjectBasePriorityQueue::Clear void   )  [virtual]
 

Erase ALL items in the container.

Returns:
true on success, false otherwise.

Implements vtkContainer.

virtual int vtkObjectBasePriorityQueue::Copy vtkObjectBasePriorityQueue container  )  [virtual]
 

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

virtual vtkIdType vtkObjectBasePriorityQueue::GetMaxSize void   )  const [virtual]
 

Returns the maximum size of this container.

Reimplemented from vtkContainer.

virtual vtkIdType vtkObjectBasePriorityQueue::GetSize void   )  const [virtual]
 

Returns the number of items in the container.

Reimplemented from vtkContainer.

virtual int vtkObjectBasePriorityQueue::IsEmpty void   )  const [virtual]
 

Returns true if this container is empty.

Reimplemented from vtkContainer.

vtkObjectBasePriorityQueue* vtkObjectBasePriorityQueue::New void   )  [static]
 

Reimplemented from vtkObject.

Reimplemented in vtkObjectPriorityQueue.

int vtkObjectBasePriorityQueue::Pop void   ) 
 

Removes the first item in this queue.

Note:
No object is returned. If the first item is needed, it should be retrieved before calling Pop.
Returns:
true on success, false otherwise.

void vtkObjectBasePriorityQueue::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkAdaptorContainer.

Reimplemented in vtkObjectPriorityQueue.

virtual int vtkObjectBasePriorityQueue::Push vtkObjectBase item,
int  priority = 0
[virtual]
 

Add an item to the end of the queue with an optional priority value.

Parameters:
item The object to be added.
priority The priority value of the object.
Returns:
true on success, false otherwise.

void vtkObjectBasePriorityQueue::ReportReferences vtkGarbageCollector *   )  [protected]
 

virtual int vtkObjectBasePriorityQueue::Swap vtkObjectBasePriorityQueue container  )  [virtual]
 

Swaps items of this container with those of the specified container.

Returns:
true on success, otherwise false.

vtkObjectBase * vtkObjectBasePriorityQueue::Top void   )  const [inline, virtual]
 

Returns the first item in this queue on success, NULL otherwise.

Reimplemented in vtkObjectPriorityQueue.

Definition at line 140 of file vtkObjectBasePriorityQueue.h.

References vtkContainer::Front().

vtkObjectBasePriorityQueue::vtkTypeRevisionMacro vtkObjectBasePriorityQueue  ,
vtkAdaptorContainer 
 


The documentation for this class was generated from the following file:
Generated on Thu Jul 14 14:40:00 2005 for vtkContainers by doxygen 1.3.6