22#ifndef vtkCollection_h
23#define vtkCollection_h
25#include "vtkCommonCoreModule.h"
30VTK_ABI_NAMESPACE_BEGIN
vtkCollectionElement * Next
iterator through a vtkCollection.
bool UsesGarbageCollector() const override
Participate in garbage collection.
int IndexOfFirstOccurence(vtkObject *a) VTK_FUTURE_CONST
Just calls IndexOfFirstOccurrence.
void ReportReferences(vtkGarbageCollector *collector) override
void RemoveItem(int i)
Remove the i'th item in the collection.
~vtkCollection() override
void ReplaceItem(int i, vtkObject *)
Replace the i'th item in the collection with the given item.
friend class vtkCollectionIterator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int IndexOfFirstOccurrence(vtkObject *a) const
Search for the given item and return the 0-based index of its first occurrence in the collection.
vtkCollectionIterator * NewIterator()
Get an iterator to traverse the items in this collection.
vtkCollectionElement * Bottom
void RemoveItem(vtkObject *)
Remove the first occurrence of the given item from the collection.
int IsItemPresent(vtkObject *a) VTK_FUTURE_CONST
Search for the given item and return the 1-based index of its first occurrence in the collection.
vtkCollectionElement * Top
void AddItem(vtkObject *)
Add given item to the bottom (end) of the collection.
void InsertItem(int i, vtkObject *)
Insert given item into the collection after the i'th item.
void InitTraversal()
Initialize the traversal of the collection.
virtual void RemoveElement(vtkCollectionElement *element, vtkCollectionElement *previous)
void RemoveAllItems()
Remove all items from the collection.
static vtkCollection * New()
Construct an empty collection.
void InitTraversal(vtkCollectionSimpleIterator &cookie)
A reentrant safe way to iterate through a collection.
int GetNumberOfItems() VTK_FUTURE_CONST
Return the number of items in the collection.
vtkObject * GetItemAsObject(int i) VTK_FUTURE_CONST
Get the i'th item in the collection.
virtual void DeleteElement(vtkCollectionElement *)
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
vtkCollectionElement * Current
a simple class to control print indentation
friend class vtkGarbageCollector
Some classes need to clear the reference counts manually due to the way they work.
abstract base class for most VTK objects
void * vtkCollectionSimpleIterator
#define VTK_DEPRECATED_IN_9_6_0(reason)