#include <vtkUniqueCollection.h>
Inheritance diagram for vtkUniqueCollection:
vtkUniqueCollection represents and provides methods to manipulate a list of items (i.e., vtkObject and subclasses). The list is unsorted, but does prevent duplicate entries. If items are being appended, prepended, inserted or replacing, they are first removed from any previously occupied position in the collection.
Definition at line 41 of file vtkUniqueCollection.h.
Public Member Functions | |
vtkTypeRevisionMacro (vtkUniqueCollection, vtkCollection) | |
void | PrintSelf (ostream &, vtkIndent) |
void | AddItem (vtkObject *item) |
Add a node to the list. | |
int | IndexOf (vtkObject *item) |
Returns the index of the node in the list or -1 if not found. | |
vtkObject * | GetNextItem (void) |
Get the next node in the list. | |
vtkObject * | GetItem (int i) |
Get the i'th node in the list. | |
vtkObject * | GetFirstItem (void) |
Get the first node in the list. | |
vtkObject * | GetLastItem (void) |
Get the last node in the list. | |
int | PrependItem (vtkObject *item) |
Insert a node to the front of the list. | |
int | AppendItem (vtkObject *item) |
Append a node to the end of the list. | |
int | InsertItemAt (vtkObject *item, int i) |
Insert node at the i'th position. | |
int | GetNumberOfItemsByType (const char *type) |
Return number of objects in the list that are derived from type . | |
vtkObject * | InitTraversalByType (const char *type) |
Initialize traversal over items derived from type , returning first. | |
vtkObject * | GetNthItemByType (int n, const char *type) |
Return n'th item in the list derived from type . | |
vtkObject * | GetNextItemByType (const char *type) |
Return next item in the list derived from type . | |
virtual unsigned long | GetMTime (void) |
Override standard GetMTime() to check for modified times of the nodes. | |
virtual void | SetCheckUnique (int) |
Toggle enforcement of uniquity among collection items (default is TRUE). | |
virtual int | GetCheckUnique () |
Toggle enforcement of uniquity among collection items (default is TRUE). | |
virtual void | CheckUniqueOn () |
Toggle enforcement of uniquity among collection items (default is TRUE). | |
virtual void | CheckUniqueOff () |
Toggle enforcement of uniquity among collection items (default is TRUE). | |
void | ReplaceItem (int i, vtkObject *item, vtkObject **ret) |
Replace the i'th node in the list with item . | |
void | ReplaceItem (int i, vtkObject *item) |
Replace the i'th node in the list with item . | |
void | RemoveItem (int i, vtkObject **ret) |
Remove the i'th item in the list. | |
void | RemoveItem (int i) |
Remove the i'th item in the list. | |
void | RemoveItem (vtkObject *item, vtkObject **ret) |
Remove item from the list. | |
void | RemoveItem (vtkObject *item) |
Remove item from the list. | |
void | RemoveLastItem (vtkObject **removed) |
Remove the last node in the list (like a stack pop). | |
void | RemoveLastItem (void) |
Remove the last node in the list (like a stack pop). | |
Static Public Member Functions | |
vtkUniqueCollection * | New (void) |
Protected Member Functions | |
vtkUniqueCollection (void) | |
~vtkUniqueCollection () | |
vtkCollectionElement * | FindCollectionElementAt (int i) |
Protected Attributes | |
int | CheckUnique |
|
Definition at line 167 of file vtkUniqueCollection.h. |
|
Definition at line 168 of file vtkUniqueCollection.h. |
|
Add a node to the list.
Reimplemented from vtkCollection. Definition at line 193 of file vtkUniqueCollection.h. References AddItem(), and CheckUnique. Referenced by AddItem(). |
|
Append a node to the end of the list.
Definition at line 348 of file vtkUniqueCollection.h. References AppendItem(), IndexOf(), vtkCollectionElement::Item, vtkObject::Modified(), vtkCollectionElement::Next, PrependItem(), vtkObject::Register(), RemoveItem(), VTK_ERROR, and VTK_OK. Referenced by AppendItem(), and InsertItemAt(). |
|
Toggle enforcement of uniquity among collection items (default is TRUE).
|
|
Toggle enforcement of uniquity among collection items (default is TRUE).
|
|
Definition at line 402 of file vtkUniqueCollection.h. References FindCollectionElementAt(), and vtkCollectionElement::Next. Referenced by FindCollectionElementAt(), and InsertItemAt(). |
|
Toggle enforcement of uniquity among collection items (default is TRUE).
|
|
Get the first node in the list.
Reimplemented in vtkExtensionsObjectCollection. Definition at line 279 of file vtkUniqueCollection.h. References vtkCollectionElement::Item. |
|
Get the i'th node in the list.
Reimplemented in vtkExtensionsObjectCollection. Definition at line 274 of file vtkUniqueCollection.h. References GetItem(). Referenced by GetItem(), and RemoveItem(). |
|
Get the last node in the list.
Reimplemented in vtkExtensionsObjectCollection. Definition at line 284 of file vtkUniqueCollection.h. References vtkCollectionElement::Item. |
|
Override standard GetMTime() to check for modified times of the nodes.
Reimplemented from vtkObject. Definition at line 559 of file vtkUniqueCollection.h. References vtkObject::GetMTime(), GetNextItem(), and vtkCollection::InitTraversal(). |
|
Get the next node in the list.
Reimplemented in vtkExtensionsObjectCollection. Definition at line 269 of file vtkUniqueCollection.h. References vtkCollection::GetNextItemAsObject(). Referenced by GetMTime(). |
|
Return next item in the list derived from
Definition at line 506 of file vtkUniqueCollection.h. References GetNextItemByType(), vtkObject::IsA(), vtkCollectionElement::Item, and vtkCollectionElement::Next. Referenced by GetNextItemByType(). |
|
Return
Definition at line 540 of file vtkUniqueCollection.h. References GetNthItemByType(), vtkObject::IsA(), vtkCollectionElement::Item, and vtkCollectionElement::Next. Referenced by GetNthItemByType(). |
|
Return number of objects in the list that are derived from
Definition at line 491 of file vtkUniqueCollection.h. References GetNumberOfItemsByType(), vtkObject::IsA(), vtkCollectionElement::Item, and vtkCollectionElement::Next. Referenced by GetNumberOfItemsByType(). |
|
Returns the index of the node in the list or -1 if not found.
Definition at line 264 of file vtkUniqueCollection.h. References IndexOf(). Referenced by AppendItem(), IndexOf(), InsertItemAt(), and PrependItem(). |
|
Initialize traversal over items derived from
Definition at line 524 of file vtkUniqueCollection.h. References InitTraversalByType(), vtkObject::IsA(), vtkCollectionElement::Item, and vtkCollectionElement::Next. Referenced by InitTraversalByType(). |
|
Insert node at the i'th position.
Definition at line 420 of file vtkUniqueCollection.h. References AppendItem(), FindCollectionElementAt(), IndexOf(), InsertItemAt(), vtkCollectionElement::Item, vtkObject::Modified(), vtkCollectionElement::Next, PrependItem(), vtkObject::Register(), RemoveItem(), VTK_ERROR, and VTK_OK. Referenced by InsertItemAt(). |
|
Reimplemented from vtkCollection. Reimplemented in vtkExtensionsObjectCollection. |
|
Insert a node to the front of the list.
Definition at line 294 of file vtkUniqueCollection.h. References IndexOf(), vtkCollectionElement::Item, vtkObject::Modified(), vtkCollectionElement::Next, PrependItem(), vtkObject::Register(), RemoveItem(), VTK_ERROR, and VTK_OK. Referenced by AppendItem(), InsertItemAt(), and PrependItem(). |
|
Reimplemented from vtkCollection. Reimplemented in vtkExtensionsObjectCollection. |
|
Remove Removes the first object found, not all occurrences. If no object found, list is unaffected. See warning in description of RemoveItem(int).
Reimplemented from vtkCollection. Definition at line 102 of file vtkUniqueCollection.h. |
|
Remove Removes the first object found, not all occurrences. If no object found, list is unaffected. See warning in description of RemoveItem(int).
Definition at line 250 of file vtkUniqueCollection.h. References vtkObject::Register(), and RemoveItem(). |
|
Remove the i'th item in the list.
Reimplemented from vtkCollection. Reimplemented in vtkExtensionsObjectCollection. Definition at line 85 of file vtkUniqueCollection.h. |
|
Remove the i'th item in the list.
Definition at line 234 of file vtkUniqueCollection.h. References GetItem(), vtkObject::Register(), and RemoveItem(). Referenced by AppendItem(), InsertItemAt(), PrependItem(), RemoveItem(), and RemoveLastItem(). |
|
Remove the last node in the list (like a stack pop).
Reimplemented in vtkExtensionsObjectCollection. Definition at line 138 of file vtkUniqueCollection.h. Referenced by vtkExtensionsObjectCollection::RemoveLastItem(). |
|
Remove the last node in the list (like a stack pop).
Definition at line 289 of file vtkUniqueCollection.h. References RemoveItem(). |
|
Replace the i'th node in the list with
Reimplemented from vtkCollection. Definition at line 68 of file vtkUniqueCollection.h. |
|
Replace the i'th node in the list with
Definition at line 203 of file vtkUniqueCollection.h. References CheckUnique, vtkObject::Register(), and ReplaceItem(). Referenced by ReplaceItem(). |
|
Toggle enforcement of uniquity among collection items (default is TRUE).
|
|
|
|
Definition at line 170 of file vtkUniqueCollection.h. Referenced by AddItem(), and ReplaceItem(). |