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

vtkVector< DType > Class Template Reference

a dynamic vector More...

#include <vtkVector.h>

Inheritance diagram for vtkVector< DType >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef vtkAbstractList< DType > Superclass
typedef vtkVectorIterator<
DType > 
IteratorType

Public Member Functions

vtkVectorIterator< DType > * NewIterator ()
int AppendItem (DType a)
void CopyItems (vtkVector< DType > *in)
int PrependItem (DType a)
int InsertItem (vtkIdType loc, DType a)
int SetItem (vtkIdType loc, DType a)
void SetItemNoCheck (vtkIdType loc, DType a)
int RemoveItem (vtkIdType id)
int GetItem (vtkIdType id, DType &ret)
void GetItemNoCheck (vtkIdType id, DType &ret)
int FindItem (DType a, vtkIdType &res)
int IsItemPresent (DType a)
vtkIdType GetNumberOfItems () const
vtkIdType GetSize () const
void RemoveAllItems ()
int SetSize (vtkIdType size)
void DebugList ()
void Sort (vtkVectorSortFunctionType)
int FindItem (DType a, vtkAbstractListCompareFunction(DType, compare), vtkIdType &res)
void SetResize (int r)
void ResizeOn ()
void ResizeOff ()
int GetResize () const

Static Public Member Functions

vtkVector< DType > * New ()

Protected Member Functions

 vtkVector ()
virtual ~vtkVector ()

Protected Attributes

vtkIdType NumberOfItems
vtkIdType Size
int Resize
DType * Array

Friends

class vtkVectorIterator< DType >

Detailed Description

template<class DType>
class vtkVector< DType >

a dynamic vector

Definition at line 31 of file vtkVector.h.


Member Typedef Documentation

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

Reimplemented from vtkAbstractList< DType >.

Reimplemented in vtkQueue< DType >.

Definition at line 37 of file vtkVector.h.

template<class DType>
typedef vtkVectorIterator<DType> vtkVector< DType >::IteratorType
 

Definition at line 38 of file vtkVector.h.


Constructor & Destructor Documentation

template<class DType>
vtkVector< DType >::vtkVector  )  [inline, protected]
 

Definition at line 128 of file vtkVector.h.

template<class DType>
virtual vtkVector< DType >::~vtkVector  )  [protected, virtual]
 


Member Function Documentation

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

Reimplemented from vtkAbstractList< DType >.

Reimplemented in vtkQueue< DType >.

template<class DType>
vtkVectorIterator<DType>* vtkVector< DType >::NewIterator  ) 
 

Return an iterator to the list. This iterator is allocated using New, so the developer is responsible for deleating it.

template<class DType>
int vtkVector< DType >::AppendItem DType  a  ) 
 

Append an Item to the end of the vector.

template<class DType>
void vtkVector< DType >::CopyItems vtkVector< DType > *  in  ) 
 

Make a copy of another conatiner.

template<class DType>
int vtkVector< DType >::PrependItem DType  a  ) 
 

Insert an Item to the front of the linked list.

template<class DType>
int vtkVector< DType >::InsertItem vtkIdType  loc,
DType  a
 

Insert an Item to the specific location in the vector. Any items in the vector at a location greater than loc will be shifted by one position to make room for the inserted item. NOTE: this can not be used with SetSize because there will be no room for the additional item.

template<class DType>
int vtkVector< DType >::SetItem vtkIdType  loc,
DType  a
 

Sets the Item at the specific location in the list to a new value. It also checks if the item can be set. It returns VTK_OK if successfull.

template<class DType>
void vtkVector< DType >::SetItemNoCheck vtkIdType  loc,
DType  a
 

Sets the Item at the specific location in the list to a new value. This method does not perform any error checking.

template<class DType>
int vtkVector< DType >::RemoveItem vtkIdType  id  ) 
 

Remove an Item from the vector

template<class DType>
int vtkVector< DType >::GetItem vtkIdType  id,
DType &  ret
 

Return an item that was previously added to this vector.

template<class DType>
void vtkVector< DType >::GetItemNoCheck vtkIdType  id,
DType &  ret
 

Return an item that was previously added to this vector.

template<class DType>
int vtkVector< DType >::FindItem DType  a,
vtkIdType &  res
 

Find an item in the vector. Return one if it was found, zero if it was not found. The location of the item is returned in res.

template<class DType>
int vtkVector< DType >::FindItem DType  a,
vtkAbstractListCompareFunction(DType, compare)  ,
vtkIdType &  res
 

Find an item in the vector 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.

template<class DType>
int vtkVector< DType >::IsItemPresent DType  a  ) 
 

Find an item in the vector. Return one if it was found, zero if it was not found.

template<class DType>
vtkIdType vtkVector< DType >::GetNumberOfItems  )  const [inline]
 

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.

Definition at line 99 of file vtkVector.h.

template<class DType>
vtkIdType vtkVector< DType >::GetSize  )  const [inline]
 

Returns the number of items the container can currently hold.

Definition at line 102 of file vtkVector.h.

template<class DType>
void vtkVector< DType >::RemoveAllItems  ) 
 

Removes all items from the container.

template<class DType>
int vtkVector< DType >::SetSize vtkIdType  size  ) 
 

Set the capacity of the vector. It returns VTK_OK if successfull. If capacity is set, the vector will not resize.

template<class DType>
void vtkVector< DType >::SetResize int  r  )  [inline]
 

Allow or disallow resizing. If resizing is disallowed, when inserting too many elements, it will return VTK_ERROR. Initially allowed.

Definition at line 114 of file vtkVector.h.

Referenced by vtkVector< vtkAbstractMapItem< const char *, int > * >::ResizeOff(), and vtkVector< vtkAbstractMapItem< const char *, int > * >::ResizeOn().

template<class DType>
void vtkVector< DType >::ResizeOn  )  [inline]
 

Allow or disallow resizing. If resizing is disallowed, when inserting too many elements, it will return VTK_ERROR. Initially allowed.

Definition at line 115 of file vtkVector.h.

template<class DType>
void vtkVector< DType >::ResizeOff  )  [inline]
 

Allow or disallow resizing. If resizing is disallowed, when inserting too many elements, it will return VTK_ERROR. Initially allowed.

Definition at line 116 of file vtkVector.h.

template<class DType>
int vtkVector< DType >::GetResize  )  const [inline]
 

Allow or disallow resizing. If resizing is disallowed, when inserting too many elements, it will return VTK_ERROR. Initially allowed.

Definition at line 117 of file vtkVector.h.

template<class DType>
void vtkVector< DType >::DebugList  ) 
 

Display the content of the list.

Reimplemented in vtkQueue< DType >.

template<class DType>
void vtkVector< DType >::Sort vtkVectorSortFunctionType   ) 
 

Sort the content of the list. Provide a comparison function (see def of vtkVectorSortFunctionType).


Friends And Related Function Documentation

template<class DType>
friend class vtkVectorIterator< DType > [friend]
 

Definition at line 33 of file vtkVector.h.


Member Data Documentation

template<class DType>
vtkIdType vtkVector< DType >::NumberOfItems [protected]
 

Definition at line 132 of file vtkVector.h.

template<class DType>
vtkIdType vtkVector< DType >::Size [protected]
 

Definition at line 133 of file vtkVector.h.

template<class DType>
int vtkVector< DType >::Resize [protected]
 

Definition at line 134 of file vtkVector.h.

template<class DType>
DType* vtkVector< DType >::Array [protected]
 

Definition at line 135 of file vtkVector.h.


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