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

vtkObjectBaseQueue Class Reference

#include <vtkObjectBaseQueue.h>

Inheritance diagram for vtkObjectBaseQueue:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseQueue:

Collaboration graph
[legend]
List of all members.

Detailed Description

A queue container for objects.

A queue is an adaptor that provides a restricted subset of Container functionality. A queue is a "first in first out" (FIFO) data structure. That is, items are added to the back of the queue and may be removed from the front; Q->front() is the item that was added to the queue least recently.

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

Definition at line 43 of file vtkObjectBaseQueue.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseQueue, 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 (vtkObjectBaseQueue *container)
 Swaps items of this container with those of the specified container.

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

Queue Operations
virtual int Push (vtkObjectBase *item)
 Add an item to the end of the queue.

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

Atypical Operations
virtual vtkObjectBaseAt (vtkIdType position) const
 Provides access by index to the objects contained in this queue.

Data Access Methods
vtkObjectBaseFront (void) const
 Returns the first item in the container, or null if the container is empty.

vtkObjectBaseBack (void) const
 Returns the last item in the container, or null if the container is empty.


Static Public Member Functions

vtkObjectBaseQueueNew (void)

Protected Member Functions

 vtkObjectBaseQueue (void)
 ~vtkObjectBaseQueue ()
void ReportReferences (vtkGarbageCollector *)


Constructor & Destructor Documentation

vtkObjectBaseQueue::vtkObjectBaseQueue void   )  [protected]
 

vtkObjectBaseQueue::~vtkObjectBaseQueue  )  [protected]
 


Member Function Documentation

virtual vtkObjectBase* vtkObjectBaseQueue::At vtkIdType  position  )  const [virtual]
 

Provides access by index to the objects contained in this queue.

Parameters:
position The item index for which object should be accessed.
Returns:
the item if position is a valid index, otherwise null.

Reimplemented in vtkObjectQueue.

vtkObjectBase* vtkObjectBaseQueue::Back void   )  const [virtual]
 

Returns the last item in the container, or null if the container is empty.

Reimplemented from vtkContainer.

Reimplemented in vtkObjectQueue.

virtual int vtkObjectBaseQueue::Clear void   )  [virtual]
 

Erase ALL items in the container.

Returns:
true on success, false otherwise.

Implements vtkContainer.

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

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

vtkObjectBase* vtkObjectBaseQueue::Front void   )  const [virtual]
 

Returns the first item in the container, or null if the container is empty.

Reimplemented from vtkContainer.

Reimplemented in vtkObjectQueue.

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

Returns the maximum size of this container.

Reimplemented from vtkContainer.

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

Returns the number of items in the container.

Reimplemented from vtkContainer.

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

Returns true if this container is empty.

Reimplemented from vtkContainer.

vtkObjectBaseQueue* vtkObjectBaseQueue::New void   )  [static]
 

Reimplemented from vtkObject.

Reimplemented in vtkObjectQueue.

int vtkObjectBaseQueue::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 vtkObjectBaseQueue::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkAdaptorContainer.

Reimplemented in vtkObjectQueue.

virtual int vtkObjectBaseQueue::Push vtkObjectBase item  )  [virtual]
 

Add an item to the end of the queue.

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

void vtkObjectBaseQueue::ReportReferences vtkGarbageCollector *   )  [protected]
 

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

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

Returns:
true on success, otherwise false.

vtkObjectBaseQueue::vtkTypeRevisionMacro vtkObjectBaseQueue  ,
vtkAdaptorContainer 
 


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