VTK
|
create and manipulate unsorted lists of objects More...
#include <vtkCollection.h>
Public Types | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCollection * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | AddItem (vtkObject *) |
void | InsertItem (int i, vtkObject *) |
void | ReplaceItem (int i, vtkObject *) |
void | RemoveItem (int i) |
void | RemoveItem (vtkObject *) |
void | RemoveAllItems () |
int | IsItemPresent (vtkObject *a) |
int | GetNumberOfItems () |
void | InitTraversal () |
vtkObject * | GetNextItemAsObject () |
vtkObject * | GetItemAsObject (int i) |
vtkCollectionIterator * | NewIterator () |
void | InitTraversal (vtkCollectionSimpleIterator &cookie) |
vtkObject * | GetNextItemAsObject (vtkCollectionSimpleIterator &cookie) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCollection * | SafeDownCast (vtkObjectBase *o) |
static vtkCollection * | New () |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
virtual void | RemoveElement (vtkCollectionElement *element, vtkCollectionElement *previous) |
virtual void | DeleteElement (vtkCollectionElement *) |
virtual void | ReportReferences (vtkGarbageCollector *collector) |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
int | NumberOfItems |
vtkCollectionElement * | Top |
vtkCollectionElement * | Bottom |
vtkCollectionElement * | Current |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Friends | |
class | vtkCollectionIterator |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
vtkCollection () | |
~vtkCollection () | |
create and manipulate unsorted lists of objects
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.
Definition at line 52 of file vtkCollection.h.
typedef vtkObject vtkCollection::Superclass |
Definition at line 55 of file vtkCollection.h.
|
protected |
Participate in garbage collection.
|
protected |
Participate in garbage collection.
|
static |
|
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, vtkPropCollection, vtkAssemblyPath, vtkLightCollection, vtkRenderPassCollection, vtkAssemblyPaths, vtkProp3DCollection, vtkActorCollection, vtkTextPropertyCollection, vtkOverrideInformationCollection, vtkPlaneCollection, vtkMapperCollection, vtkVolumeCollection, vtkRenderPassCollection, vtkShader2Collection, vtkDataObjectCollection, vtkPolyDataCollection, vtkTransformCollection, vtkCullerCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkObjectFactoryCollection, vtkImageSliceCollection, vtkImplicitFunctionCollection, vtkImageReader2Collection, vtkDataArrayCollection, vtkIdListCollection, vtkDataSetCollection, vtkStructuredPointsCollection, and vtkSocketCollection.
|
static |
|
protectedvirtual |
Reimplemented from vtkObject.
Reimplemented in vtkActor2DCollection, vtkPropCollection, vtkAssemblyPath, vtkLightCollection, vtkRenderPassCollection, vtkAssemblyPaths, vtkProp3DCollection, vtkActorCollection, vtkTextPropertyCollection, vtkOverrideInformationCollection, vtkPlaneCollection, vtkMapperCollection, vtkVolumeCollection, vtkRenderPassCollection, vtkShader2Collection, vtkDataObjectCollection, vtkPolyDataCollection, vtkTransformCollection, vtkCullerCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkObjectFactoryCollection, vtkImageSliceCollection, vtkImplicitFunctionCollection, vtkImageReader2Collection, vtkDataArrayCollection, vtkIdListCollection, vtkDataSetCollection, vtkStructuredPointsCollection, and vtkSocketCollection.
vtkCollection* vtkCollection::NewInstance | ( | ) | const |
|
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, vtkLightCollection, vtkRenderPassCollection, vtkProp3DCollection, vtkActorCollection, vtkTextPropertyCollection, vtkMapperCollection, vtkVolumeCollection, vtkRenderPassCollection, vtkShader2Collection, vtkPolyDataCollection, vtkCullerCollection, vtkRendererCollection, vtkRenderWindowCollection, vtkImageReader2Collection, vtkStructuredPointsCollection, and vtkSocketCollection.
|
static |
Construct with empty list.
void vtkCollection::AddItem | ( | vtkObject * | ) |
Add an object to the list. Does not prevent duplicate entries.
Insert item into the list after the i'th item. Does not prevent duplicate entries. If i < 0 the item is placed at the top of the list.
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.
void vtkCollection::RemoveItem | ( | vtkObject * | ) |
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.
Search for an object and return location in list. If the return value is 0, the object was not found. If the object was found, the location is the return value-1.
|
inline |
Return the number of objects in the list.
Definition at line 93 of file vtkCollection.h.
|
inline |
Initialize the traversal of the collection. This means the data pointer is set at the beginning of the list.
Definition at line 97 of file vtkCollection.h.
|
inline |
A reentrant safe way to iterate through a collection. Just pass the same cookie value around each time
Definition at line 103 of file vtkCollection.h.
|
inline |
Get the next item in the collection. NULL is returned if the collection is exhausted.
Definition at line 156 of file vtkCollection.h.
Get the i'th item in the collection. NULL is returned if i is out of range
|
inline |
A reentrant safe way to get the next object as a collection. Just pass the same cookie back and forth.
Definition at line 171 of file vtkCollection.h.
vtkCollectionIterator* vtkCollection::NewIterator | ( | ) |
Get an iterator to traverse the objects in this collection.
|
virtual |
Participate in garbage collection.
Reimplemented from vtkObjectBase.
|
virtual |
Participate in garbage collection.
Reimplemented from vtkObjectBase.
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in vtkActor2DCollection, and vtkImageSliceCollection.
|
protectedvirtual |
Reimplemented from vtkObjectBase.
|
friend |
Definition at line 145 of file vtkCollection.h.
|
protected |
Definition at line 139 of file vtkCollection.h.
|
protected |
Definition at line 140 of file vtkCollection.h.
|
protected |
Definition at line 141 of file vtkCollection.h.
|
protected |
Definition at line 142 of file vtkCollection.h.