Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkAbstractList< DType > Class Template Reference

a dynamic list data structure More...

#include <vtkAbstractList.h>

Inheritance diagram for vtkAbstractList< DType >:

Inheritance graph
[legend]
Collaboration diagram for vtkAbstractList< DType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef vtkContainer Superclass

Public Member Functions

typedef vtkAbstractListCompareFunction (DType, CompareFunctionType)

Static Public Member Functions

vtkAbstractList< DType > * New ()

Protected Member Functions

 vtkAbstractList ()

Detailed Description

template<class DType>
class vtkAbstractList< DType >

a dynamic list data structure

vtkAbstractList is a an abstract templated superclass of all containers that implement list data structure.

List data structure is a one dimensional sequence of elements with strict ordering. Every element has an index and each element except the first and the last one, have unique predecessor and successor. Examples of list data structure are dynamic array (vector) and linked list.

Each List container class has to implement the following methods:

int AppendItem(DType a); Append an Item to the end of the list. It returns VTK_OK if successfull.

int PrependItem(DType a); Insert an Item to the front of the list. All items are moved one place to the right It returns VTK_OK if successfull.

int InsertItem(vtkIdType loc, DType a); Insert an Item to the specific location in the list. All items from that location on are moved one place to the right. It returns VTK_OK if successfull.

int SetItem(vtkIdType loc, DType a); Sets the Item at the specific location in the list to a new value. The old value is lost. This method should also checks if the item can be set. It returns VTK_OK if successfull.

void SetItemNoCheck(vtkIdType loc, DType a); Sets the Item at the specific location in the list to a new value. The old value is lost. This method does not perform any error checking.

int RemoveItem(vtkIdType loc); Remove an Item at a specified location from the list. This means that all items following this item will be moved one place to the left. It returns VTK_OK if successfull.

int GetItem(vtkIdType loc, DType& ret); Return an item at the specified location of the list. It returns VTK_OK if successfull.

int FindItem(DType a, vtkIdType &res); Find an item in the list. Return VTK_OK if it was found, VTK_ERROR if it was not found. The location of the item is returned in res.

int FindItem(DType a, CompareFunctionType compare, vtkIdType &res); Find an item in the list using a comparison routine. Return VTK_OK if it was found, VTK_ERROR if it was not found. The location of the item is returned in res.

int SetSize(vtkIdType size); Set the capacity of the list. It returns VTK_OK if successfull.

vtkIdType GetNumberOfItems(); Return the number of items currently held in this container. This different from GetSize which is provided for some containers. GetSize will return how many items the container can currently hold.

vtkIdType GetSize(); Returns the number of items the container can currently hold. This is the capacity of the container.

See also:
vtkContainer vtkAbstractMap

Definition at line 97 of file vtkAbstractList.h.


Member Typedef Documentation

template<class DType>
typedef vtkContainer vtkAbstractList< DType >::Superclass
 

Reimplemented in vtkLinkedList< DType >, vtkQueue< DType >, vtkVector< DType >, vtkLinkedList< vtkPVWriter * >, vtkLinkedList< const char * >, vtkLinkedList< vtkPVReaderModule * >, vtkLinkedList< void * >, vtkVector< vtkAbstractMapItem< const char *, const char * > * >, vtkVector< vtkAbstractMapItem< const char *, vtkPVSourceCollection * > * >, vtkVector< ItemType >, vtkVector< const char * >, vtkVector< vtkAbstractMapItem< const char *, vtkPVSource * > * >, vtkVector< vtkAbstractMapItem< KeyType, DataType > * >, vtkVector< vtkPVLookmark * >, vtkVector< vtkAbstractMapItem< const char *, vtkKWPushButton * > * >, vtkVector< vtkAbstractMapItem< vtkPVXMLElement *, vtkPVWidget * > * >, vtkVector< vtkKWLookmarkFolder * >, and vtkVector< vtkAbstractMapItem< const char *, int > * >.

Definition at line 101 of file vtkAbstractList.h.


Constructor & Destructor Documentation

template<class DType>
vtkAbstractList< DType >::vtkAbstractList  )  [protected]
 


Member Function Documentation

template<class DType>
vtkAbstractList<DType>* vtkAbstractList< DType >::New  )  [static]
 

Reimplemented in vtkLinkedList< DType >, vtkQueue< DType >, vtkVector< DType >, vtkLinkedList< vtkPVWriter * >, vtkLinkedList< const char * >, vtkLinkedList< vtkPVReaderModule * >, vtkLinkedList< void * >, vtkVector< vtkAbstractMapItem< const char *, const char * > * >, vtkVector< vtkAbstractMapItem< const char *, vtkPVSourceCollection * > * >, vtkVector< ItemType >, vtkVector< const char * >, vtkVector< vtkAbstractMapItem< const char *, vtkPVSource * > * >, vtkVector< vtkAbstractMapItem< KeyType, DataType > * >, vtkVector< vtkPVLookmark * >, vtkVector< vtkAbstractMapItem< const char *, vtkKWPushButton * > * >, vtkVector< vtkAbstractMapItem< vtkPVXMLElement *, vtkPVWidget * > * >, vtkVector< vtkKWLookmarkFolder * >, and vtkVector< vtkAbstractMapItem< const char *, int > * >.

template<class DType>
typedef vtkAbstractList< DType >::vtkAbstractListCompareFunction DType  ,
CompareFunctionType 
 


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:34:28 2006 for ParaView by doxygen 1.3.5