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

vtkArrayMap< KeyType, DataType > Class Template Reference

a dynamic map data structure More...

#include <vtkArrayMap.h>

Inheritance diagram for vtkArrayMap< KeyType, DataType >:

Inheritance graph
[legend]
Collaboration diagram for vtkArrayMap< KeyType, DataType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef vtkAbstractMap< KeyType,
DataType > 
Superclass
typedef vtkArrayMapIterator<
KeyType, DataType > 
IteratorType

Public Member Functions

vtkArrayMapIterator< KeyType,
DataType > * 
NewIterator ()
int SetItem (const KeyType &key, const DataType &data)
int RemoveItem (const KeyType &key)
void RemoveAllItems ()
int GetItem (const KeyType &key, DataType &data)
vtkIdType GetNumberOfItems () const
int IsItemPresent (const KeyType &key)
void DebugList ()

Static Public Member Functions

vtkArrayMap< KeyType, DataType > * New ()

Protected Member Functions

 vtkArrayMap ()
virtual ~vtkArrayMap ()
virtual vtkAbstractMapItem<
KeyType, DataType > * 
FindDataItem (const KeyType key)

Protected Attributes

vtkVector< vtkAbstractMapItem<
KeyType, DataType > * > * 
Array

Friends

class vtkArrayMapIterator< KeyType, DataType >

Detailed Description

template<class KeyType, class DataType>
class vtkArrayMap< KeyType, DataType >

a dynamic map data structure

vtkArrayMap is a an array implementation of the map data structure

Map data structure is a one dimensional sequence of pairs of key and data. On the higher level, it implements mapping from key values to data elements. It can be implemented using array of pairs, hash table, or different trees.

See also:
vtkAbstractMap

Definition at line 37 of file vtkArrayMap.h.


Member Typedef Documentation

template<class KeyType, class DataType>
typedef vtkAbstractMap<KeyType,DataType> vtkArrayMap< KeyType, DataType >::Superclass
 

Reimplemented from vtkAbstractMap< KeyType, DataType >.

Definition at line 42 of file vtkArrayMap.h.

template<class KeyType, class DataType>
typedef vtkArrayMapIterator<KeyType,DataType> vtkArrayMap< KeyType, DataType >::IteratorType
 

Definition at line 43 of file vtkArrayMap.h.


Constructor & Destructor Documentation

template<class KeyType, class DataType>
vtkArrayMap< KeyType, DataType >::vtkArrayMap  )  [inline, protected]
 

Definition at line 82 of file vtkArrayMap.h.

template<class KeyType, class DataType>
virtual vtkArrayMap< KeyType, DataType >::~vtkArrayMap  )  [protected, virtual]
 


Member Function Documentation

template<class KeyType, class DataType>
vtkArrayMap<KeyType,DataType>* vtkArrayMap< KeyType, DataType >::New  )  [static]
 

template<class KeyType, class DataType>
vtkArrayMapIterator<KeyType,DataType>* vtkArrayMap< KeyType, DataType >::NewIterator  ) 
 

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

template<class KeyType, class DataType>
int vtkArrayMap< KeyType, DataType >::SetItem const KeyType &  key,
const DataType &  data
 

Sets the item at with specific key to data. It overwrites the old item. It returns VTK_OK if successfull.

template<class KeyType, class DataType>
int vtkArrayMap< KeyType, DataType >::RemoveItem const KeyType &  key  ) 
 

Remove an Item with the key from the map. It returns VTK_OK if successfull.

template<class KeyType, class DataType>
void vtkArrayMap< KeyType, DataType >::RemoveAllItems  ) 
 

Remove all items from the map.

template<class KeyType, class DataType>
int vtkArrayMap< KeyType, DataType >::GetItem const KeyType &  key,
DataType &  data
 

Return the data asociated with the key. It returns VTK_OK if successfull.

template<class KeyType, class DataType>
vtkIdType vtkArrayMap< KeyType, DataType >::GetNumberOfItems  )  const
 

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.

template<class KeyType, class DataType>
int vtkArrayMap< KeyType, DataType >::IsItemPresent const KeyType &  key  ) 
 

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

template<class KeyType, class DataType>
void vtkArrayMap< KeyType, DataType >::DebugList  ) 
 

template<class KeyType, class DataType>
virtual vtkAbstractMapItem<KeyType,DataType>* vtkArrayMap< KeyType, DataType >::FindDataItem const KeyType  key  )  [protected, virtual]
 

Find vtkAbstractMapItem that with specific key


Friends And Related Function Documentation

template<class KeyType, class DataType>
friend class vtkArrayMapIterator< KeyType, DataType > [friend]
 

Definition at line 39 of file vtkArrayMap.h.


Member Data Documentation

template<class KeyType, class DataType>
vtkVector< vtkAbstractMapItem<KeyType,DataType>* >* vtkArrayMap< KeyType, DataType >::Array [protected]
 

Definition at line 91 of file vtkArrayMap.h.


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