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

vtkLinkedList< DType > Class Template Reference

a templated linked list More...

#include <vtkLinkedList.h>

Inheritance diagram for vtkLinkedList< DType >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef vtkAbstractList< DType > Superclass
typedef vtkLinkedListIterator<
DType > 
IteratorType

Public Member Functions

vtkLinkedListIterator< DType > * NewIterator ()
int AppendItem (DType a)
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)
int FindItem (DType a, vtkIdType &res)
vtkIdType GetNumberOfItems () const
vtkIdType GetSize () const
void RemoveAllItems ()
int SetSize (vtkIdType)
void DebugList ()
int FindItem (DType a, vtkAbstractListCompareFunction(DType, compare), vtkIdType &res)

Static Public Member Functions

vtkLinkedList< DType > * New ()

Protected Member Functions

 vtkLinkedList ()
virtual ~vtkLinkedList ()
vtkLinkedListNode< DType > * FindNode (vtkIdType i)

Protected Attributes

vtkIdType NumberOfItems
vtkLinkedListNode< DType > * Head
vtkLinkedListNode< DType > * Tail

Friends

class vtkLinkedListIterator< DType >

Detailed Description

template<class DType>
class vtkLinkedList< DType >

a templated linked list

Definition at line 27 of file vtkLinkedList.h.


Member Typedef Documentation

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

Reimplemented from vtkAbstractList< DType >.

Definition at line 33 of file vtkLinkedList.h.

template<class DType>
typedef vtkLinkedListIterator<DType> vtkLinkedList< DType >::IteratorType
 

Definition at line 34 of file vtkLinkedList.h.


Constructor & Destructor Documentation

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

Definition at line 99 of file vtkLinkedList.h.

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


Member Function Documentation

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

Reimplemented from vtkAbstractList< DType >.

template<class DType>
vtkLinkedListIterator<DType>* vtkLinkedList< 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 vtkLinkedList< DType >::AppendItem DType  a  ) 
 

Append an Item to the end of the linked list.

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

Insert an Item to the front of the linked list.

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

Insert an Item to the specific location in the linked list.

template<class DType>
int vtkLinkedList< 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 vtkLinkedList< 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 vtkLinkedList< DType >::RemoveItem vtkIdType  id  ) 
 

Remove an Item from the linked list

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

Return an item that was previously added to this linked list.

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

Find an item in the linked list. Return VTK_OK if it was found od VTK_ERROR if not found. The location of the item is returned in res.

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

Find an item in the linked list using a comparison routine. Return VTK_OK if it was found od VTK_ERROR if not found. The location of the item is returned in res.

template<class DType>
vtkIdType vtkLinkedList< 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 81 of file vtkLinkedList.h.

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

Returns the number of items the container can currently hold. Since capacity is arbitrary for the linked list, this will always return the current number of elements.

Definition at line 86 of file vtkLinkedList.h.

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

Removes all items from the container.

template<class DType>
int vtkLinkedList< DType >::SetSize vtkIdType   )  [inline]
 

Since linked list does not have the notion of capacity, this method always return VTK_ERROR.

Definition at line 93 of file vtkLinkedList.h.

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

This method dumps debug of the linked list.

template<class DType>
vtkLinkedListNode<DType>* vtkLinkedList< DType >::FindNode vtkIdType  i  )  [protected]
 

Find a node with given index.


Friends And Related Function Documentation

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

Definition at line 29 of file vtkLinkedList.h.


Member Data Documentation

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

Definition at line 108 of file vtkLinkedList.h.

template<class DType>
vtkLinkedListNode<DType>* vtkLinkedList< DType >::Head [protected]
 

Definition at line 109 of file vtkLinkedList.h.

template<class DType>
vtkLinkedListNode<DType>* vtkLinkedList< DType >::Tail [protected]
 

Definition at line 110 of file vtkLinkedList.h.


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