Documentation for vtkCollection

vtkCollection - create and manipulate unsorted lists of objects

Super Class: vtkObject

Description:

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

 

Methods:

void PrintSelf (unknown & ,vtkIndent )
static vtkCollection *New ()
const char *GetClassName ()
void vtkCollection ()
void vtkCollection ()
void AddItem (vtkObject *)
void ReplaceItem (int ,vtkObject *)
void RemoveItem (int )
void RemoveItem (vtkObject *)
void RemoveAllItems ()
int IsItemPresent (vtkObject *)
int GetNumberOfItems ()
void InitTraversal ()
vtkObject *GetNextItemAsObject ()
vtkObject *GetItemAsObject (int )
void DeleteElement (vtkCollectionElement *)

 

Detailed Method Descriptions:

Construct with empty list.

void vtkCollection ()

Desctructor for the vtkCollection class. This removes all objects from the collection.

void vtkCollection ()

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

void AddItem (vtkObject *)

Replace the i'th item in the collection with a

void ReplaceItem (int ,vtkObject *)

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.

void RemoveItem (int )

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 RemoveItem (vtkObject *)

Remove all objects from the list.

void RemoveAllItems ()

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

int IsItemPresent (vtkObject *)

Return the number of objects in the list.

int GetNumberOfItems ()

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

void InitTraversal ()

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

vtkObject *GetNextItemAsObject ()

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

vtkObject *GetItemAsObject (int )