Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkCollection Class Reference

create and manipulate unsorted lists of objects. More...

#include <vtkCollection.h>

Inheritance diagram for vtkCollection:

Inheritance graph
[legend]
Collaboration diagram for vtkCollection:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void AddItem (vtkObject *)
void ReplaceItem (int i, vtkObject *)
void RemoveItem (int i)
void RemoveItem (vtkObject *)
void RemoveAllItems ()
int IsItemPresent (vtkObject *)
int GetNumberOfItems ()
void InitTraversal ()
vtkObjectGetNextItemAsObject ()
vtkObjectGetItemAsObject (int i)

Static Public Methods

int IsTypeOf (const char *type)
vtkCollection * SafeDownCast (vtkObject *o)
vtkCollection * New ()

Protected Methods

 vtkCollection ()
 ~vtkCollection ()
 vtkCollection (const vtkCollection &)
void operator= (const vtkCollection &)
virtual void DeleteElement (vtkCollectionElement *)

Protected Attributes

int NumberOfItems
vtkCollectionElementTop
vtkCollectionElementBottom
vtkCollectionElementCurrent

Detailed Description

create and manipulate unsorted lists of objects.

Date:
2000/12/10 20:08:07
Revision:
1.39

vtkCollection is a general object for creating and manipulating lists of objects. The lists are unsorted and allow duplicate entries. vtkCollection also serves as a base class for lists of specific types of objects.

See also:
vtkActorCollection vtkAssemblyPaths vtkDataSetCollection vtkImplicitFunctionCollection vtkLightCollection vtkPolyDataCollection vtkRenderWindowCollection vtkRendererCollection vtkStructuredPointsCollection vtkTransformCollection vtkVolumeCollection

Definition at line 72 of file vtkCollection.h.


Constructor & Destructor Documentation

vtkCollection::vtkCollection   [protected]
 

vtkCollection::~vtkCollection   [protected]
 

vtkCollection::vtkCollection const vtkCollection &    [inline, protected]
 

Definition at line 124 of file vtkCollection.h.


Member Function Documentation

virtual const char* vtkCollection::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkActor2DCollection, vtkAssemblyPath, vtkAssemblyPaths, vtkDataObjectCollection, vtkDataSetCollection, vtkImplicitFunctionCollection, vtkObjectFactoryCollection, vtkPlaneCollection, vtkPropCollection, vtkTransformCollection, vtkActorCollection, vtkCullerCollection, vtkLightCollection, vtkMapperCollection, vtkPolyDataCollection, vtkProp3DCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkStructuredPointsCollection, vtkVolumeCollection, and vtkImagerCollection.

int vtkCollection::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkActor2DCollection, vtkAssemblyPath, vtkDataObjectCollection, vtkDataSetCollection, vtkImplicitFunctionCollection, vtkObjectFactoryCollection, vtkPlaneCollection, vtkPropCollection, vtkTransformCollection, vtkActorCollection, vtkCullerCollection, vtkLightCollection, vtkMapperCollection, vtkPolyDataCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkStructuredPointsCollection, vtkVolumeCollection, and vtkImagerCollection.

virtual int vtkCollection::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkActor2DCollection, vtkAssemblyPath, vtkDataObjectCollection, vtkDataSetCollection, vtkImplicitFunctionCollection, vtkObjectFactoryCollection, vtkPlaneCollection, vtkPropCollection, vtkTransformCollection, vtkActorCollection, vtkCullerCollection, vtkLightCollection, vtkMapperCollection, vtkPolyDataCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkStructuredPointsCollection, vtkVolumeCollection, and vtkImagerCollection.

vtkCollection* vtkCollection::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkActor2DCollection, vtkAssemblyPath, vtkDataObjectCollection, vtkDataSetCollection, vtkImplicitFunctionCollection, vtkObjectFactoryCollection, vtkPlaneCollection, vtkPropCollection, vtkTransformCollection, vtkActorCollection, vtkCullerCollection, vtkLightCollection, vtkMapperCollection, vtkPolyDataCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkStructuredPointsCollection, vtkVolumeCollection, and vtkImagerCollection.

void vtkCollection::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkAssemblyPath.

vtkCollection* vtkCollection::New   [static]
 

Construct with empty list.

Reimplemented from vtkObject.

Reimplemented in vtkActor2DCollection, vtkAssemblyPath, vtkAssemblyPaths, vtkDataObjectCollection, vtkDataSetCollection, vtkImplicitFunctionCollection, vtkObjectFactoryCollection, vtkPlaneCollection, vtkPropCollection, vtkTransformCollection, vtkActorCollection, vtkCullerCollection, vtkLightCollection, vtkMapperCollection, vtkPolyDataCollection, vtkProp3DCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkStructuredPointsCollection, vtkVolumeCollection, and vtkImagerCollection.

void vtkCollection::AddItem vtkObject   o
 

Add an object to the list. Does not prevent duplicate entries.

Referenced by vtkImagerCollection::AddItem(), vtkVolumeCollection::AddItem(), vtkStructuredPointsCollection::AddItem(), vtkRenderWindowCollection::AddItem(), vtkRendererCollection::AddItem(), vtkProp3DCollection::AddItem(), vtkPolyDataCollection::AddItem(), vtkMapperCollection::AddItem(), vtkCullerCollection::AddItem(), vtkActorCollection::AddItem(), vtkTransformCollection::AddItem(), vtkPropCollection::AddItem(), vtkPlaneCollection::AddItem(), vtkObjectFactoryCollection::AddItem(), vtkImplicitFunctionCollection::AddItem(), vtkDataSetCollection::AddItem(), vtkDataObjectCollection::AddItem(), vtkAssemblyPaths::AddItem(), and vtkAssemblyPath::TransformedProp().

void vtkCollection::ReplaceItem int    i,
vtkObject  
 

Replace the i'th item in the collection with a

void vtkCollection::RemoveItem int    i
 

Remove the i'th item in the list. Be careful if using this function during traversal of the list using GetNextItemAsObject (or GetNextItem in derived class). The list WILL be shortened if a valid index is given! If this->Current is equal to the element being removed, have it point to then next element in the list.

Referenced by vtkAssemblyPaths::RemoveItem().

void vtkCollection::RemoveItem vtkObject   o
 

Remove an object from the list. Removes the first object found, not all occurrences. If no object found, list is unaffected. See warning in description of RemoveItem(int).

void vtkCollection::RemoveAllItems  
 

Remove all objects from the list.

int vtkCollection::IsItemPresent vtkObject   o
 

Search for an object and return location in list. If location == 0, object was not found.

Referenced by vtkAssemblyPaths::IsItemPresent(), and vtkActor2DCollection::IsItemPresent().

int vtkCollection::GetNumberOfItems  
 

Return the number of objects in the list.

void vtkCollection::InitTraversal   [inline]
 

Initialize the traversal of the collection. This means the data pointer is set at the beginning of the list.

Definition at line 111 of file vtkCollection.h.

vtkObject * vtkCollection::GetNextItemAsObject   [inline]
 

Get the next item in the collection. NULL is returned if the collection is exhausted.

Definition at line 136 of file vtkCollection.h.

Referenced by vtkAssemblyPaths::GetNextItem().

vtkObject* vtkCollection::GetItemAsObject int    i
 

Get the i'th item in the collection. NULL is returned if i is out of range

void vtkCollection::operator= const vtkCollection &    [inline, protected]
 

Definition at line 125 of file vtkCollection.h.

virtual void vtkCollection::DeleteElement vtkCollectionElement   [protected, virtual]
 

Reimplemented in vtkActor2DCollection.


Member Data Documentation

int vtkCollection::NumberOfItems [protected]
 

Definition at line 128 of file vtkCollection.h.

vtkCollectionElement* vtkCollection::Top [protected]
 

Definition at line 129 of file vtkCollection.h.

vtkCollectionElement* vtkCollection::Bottom [protected]
 

Definition at line 130 of file vtkCollection.h.

vtkCollectionElement* vtkCollection::Current [protected]
 

Definition at line 131 of file vtkCollection.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:46:58 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001