#include <vtkContainer.h>
Inheritance diagram for vtkContainer:
A Container is an object that stores other objects (its items), and that has methods for accessing its items. In particular, every type that is a model of Container has an associated iterator type that can be used to iterate through the Container's items.
There is no guarantee that the items of a Container are stored in any definite order; the order might, in fact, be different upon each iteration through the Container. Nor is there a guarantee that more than one iterator into a Container may be active at any one time. (Specific types of Containers, such as Forward Container, do provide such guarantees.)
A Container "owns" its items: the reference of an item stored in a container is incremented on addition to the container and decremented on its removal or destruction of the container itself.
Definition at line 48 of file vtkContainer.h.
Public Member Functions | |
vtkTypeRevisionMacro (vtkContainer, vtkObject) | |
void | PrintSelf (ostream &, vtkIndent) |
virtual vtkIdType | GetSize (void) const |
Returns the number of items in the container. | |
virtual int | IsEmpty (void) const |
Returns true if this container is empty. | |
virtual vtkIdType | GetMaxSize (void) const |
Returns the maximum size of this container. | |
virtual int | Clear (void)=0 |
Erase ALL items in the container. | |
virtual int | Swap (vtkContainer *container)=0 |
Swaps items of this container with those of the specified container. | |
virtual int | Copy (vtkContainer *container)=0 |
Copy all items from the specified container into this container. | |
virtual vtkIterator * | CreateIterator (void)=0 |
Create an iterator. | |
void | Register (vtkObjectBase *) |
Increase the reference count (mark as used by another object). | |
void | UnRegister (vtkObjectBase *) |
Decrease the reference count (release by another object). | |
Data Access Methods | |
virtual vtkObjectBase * | Front (void) const |
Returns the first item in the container, or null if the container is empty. | |
virtual vtkObjectBase * | Back (void) const |
Returns the last item in the container, or null if the container is empty. | |
Protected Member Functions | |
vtkContainer (void) | |
~vtkContainer () |
|
|
|
|
|
Returns the last item in the container, or
Reimplemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseVector, vtkObjectDeque, vtkObjectHashMap, vtkObjectList, vtkObjectMap, vtkObjectQueue, vtkObjectSet, and vtkObjectVector. Referenced by vtkObjectBaseStack::Top(). |
|
Erase ALL items in the container.
Implemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBasePriorityQueue, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseStack, and vtkObjectBaseVector. |
|
Copy all items from the specified container into this container.
|
|
Create an iterator.
Implemented in vtkAssociativeContainer, vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBaseSet, vtkObjectBaseVector, vtkObjectDeque, vtkObjectHashMap, vtkObjectList, vtkObjectMap, vtkObjectSet, vtkObjectVector, and vtkSequenceContainer. |
|
Returns the first item in the container, or
Reimplemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseVector, vtkObjectDeque, vtkObjectHashMap, vtkObjectList, vtkObjectMap, vtkObjectQueue, vtkObjectSet, and vtkObjectVector. Referenced by vtkObjectBasePriorityQueue::Top(). |
|
Returns the maximum size of this container.
Reimplemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBasePriorityQueue, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseStack, and vtkObjectBaseVector. |
|
Returns the number of items in the container.
Reimplemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBasePriorityQueue, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseStack, and vtkObjectBaseVector. |
|
Returns
Reimplemented in vtkObjectBaseDeque, vtkObjectBaseHashMap, vtkObjectBaseList, vtkObjectBaseMap, vtkObjectBasePriorityQueue, vtkObjectBaseQueue, vtkObjectBaseSet, vtkObjectBaseStack, and vtkObjectBaseVector. |
|
|
Increase the reference count (mark as used by another object).
Reimplemented from vtkObject. |
|
Swaps items of this container with those of the specified container.
|
|
Decrease the reference count (release by another object).
Reimplemented from vtkObject. |
|
|