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

vtkObjectBaseStack Class Reference

#include <vtkObjectBaseStack.h>

Inheritance diagram for vtkObjectBaseStack:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseStack:

Collaboration graph
[legend]
List of all members.

Detailed Description

A stack object for objects.

Calls Register when objects are pushed onto the stack and UnRegister when the object is popped.

Author:
Sean McInerney
Version:
Revision
1.5
Date:
Date
2004/06/03 18:58:28
See also:
vtkObjectBase

Definition at line 38 of file vtkObjectBaseStack.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseStack, vtkContainer)
vtkIdType GetSize (void) const
 Returns the number of elements in the stack.

int IsEmpty (void) const
 Returns true if the stack is empty.

vtkIdType GetMaxSize (void) const
 Returns the maximum size of the stack.

void Clear (void)
 Remove ALL elements (makes the container empty).

virtual int Swap (vtkObjectBaseStack *container)
 Swaps elements of this object with those of the specified container.

vtkObjectBaseStackIterator * CreateIterator (void)
 Create an iterator.

Stack Operations
virtual int Push (vtkObjectBase *object)
 Add an object pointer to the top of the stack.

int Pop (void)
 Removes the first element.

virtual vtkObjectBase * Top (void) const
 Get a pointer to the object at the first element of the stack.


Static Public Member Functions

vtkObjectBaseStack * New (void)

Protected Member Functions

 vtkObjectBaseStack (void)
 ~vtkObjectBaseStack ()


Constructor & Destructor Documentation

vtkObjectBaseStack::vtkObjectBaseStack (  void   )  [protected]
 

vtkObjectBaseStack::~vtkObjectBaseStack (   )  [protected]
 


Member Function Documentation

void vtkObjectBaseStack::Clear (  void   )  [virtual]
 

Remove ALL elements (makes the container empty).

Implements vtkContainer.

vtkObjectBaseStackIterator* vtkObjectBaseStack::CreateIterator (  void   )  [virtual]
 

Create an iterator.

Implements vtkContainer.

Reimplemented in vtkExtensionsObjectStack, and vtkObjectStack.

vtkIdType vtkObjectBaseStack::GetMaxSize (  void   )  const [virtual]
 

Returns the maximum size of the stack.

Reimplemented from vtkContainer.

vtkIdType vtkObjectBaseStack::GetSize (  void   )  const [virtual]
 

Returns the number of elements in the stack.

Reimplemented from vtkContainer.

int vtkObjectBaseStack::IsEmpty (  void   )  const [virtual]
 

Returns true if the stack is empty.

Reimplemented from vtkContainer.

vtkObjectBaseStack* vtkObjectBaseStack::New (  void   )  [static]
 

Reimplemented from vtkExtensionsObject.

Reimplemented in vtkExtensionsObjectStack, vtkObjectStack, vtkPaletteElementStack, and vtkPaletteStack.

int vtkObjectBaseStack::Pop (  void   ) 
 

Removes the first element.

This is a typical stack operation. It shrinks the stack by one.

Note:
No object is returned, and if the first element's object pointer is needed, it should be retrieved before Pop() is called.
Returns:
true on success, false otherwise.

virtual int vtkObjectBaseStack::Push (  vtkObjectBase *  object  )  [virtual]
 

Add an object pointer to the top of the stack.

Parameters:
object The object pointer to be added.
This is a typical stack operation. The function creates an element at the top of the stack and assigns the given object pointer to it.

Returns:
true on success, false otherwise.

virtual int vtkObjectBaseStack::Swap (  vtkObjectBaseStack *  container  )  [virtual]
 

Swaps elements of this object with those of the specified container.

Returns:
true on success, otherwise false.

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

Get a pointer to the object at the first element of the stack.

Returns:
A pointer to the first object on success, NULL otherwise.

Reimplemented in vtkExtensionsObjectStack, vtkObjectStack, vtkPaletteElementStack, and vtkPaletteStack.

Definition at line 144 of file vtkObjectBaseStack.h.

References vtkContainer::Back().

vtkObjectBaseStack::vtkTypeRevisionMacro (  vtkObjectBaseStack  ,
vtkContainer 
) 
 


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:46 2004 for vtkExtensions by doxygen 1.3.7