FullLinkedList_Iterator man page

FullLinkedList< T >::Iterator —

Synopsis

#include <FullLinkedList.hh>

Inherits FullLinkedList< T >::ReadIterator.

Public Member Functions

virtual ~Iterator ()

void removeCurrent ()

T * removeAndGetCurrent ()

void insertAfter (T *element)

void insertAfterRef (T *element)

void insertBefore (T *element)

void insertBeforeRef (T *element)

Friends

class FullLinkedList

Additional Inherited Members

Detailed Description

template<class T>

class FullLinkedList< T >::Iterator" Allows full access on the linked list. This includes write access as specified in the parentclass ReadIterator as well as functions to add and remove elements. Can be reduced to a ReadIterator by the FullLinkedList.reduceWriteIterator() to release its writeLock.

Constructor & Destructor Documentation

template<class T> virtual FullLinkedList< T >::Iterator::~Iterator () [virtual]

Releases the read- and writeLock of this list. If noReadRelease in the parent class is set to true, only the writeLock is released. This allows the construction of a ReadIterator without loosing synchronisation.

Member Function Documentation

template<class T> void FullLinkedList< T >::Iterator::insertAfter (T * element)

inserts a new element after the current element. The current element is unchanged. If the list is empty, a new list is created. The current element will be the new element. If there is no current element, nothing is done. A copy of the element is done through the copy constructor of the element T.

Parameters:

element A pointer to the element that is added

template<class T> void FullLinkedList< T >::Iterator::insertAfterRef (T * element)

inserts a new element after the current element. The current element is unchanged. If the list is empty, a new list is created. The current element will be the new element. If there is no current element, nothing is done. !! Only a reference is copied, use it with special care !!

Parameters:

element A pointer to the element that is added

template<class T> void FullLinkedList< T >::Iterator::insertBefore (T * element)

inserts a new element before the current element. The current element is unchanged. If the list is empty, a new list is created, the current element is set to the new element. If there is no current element, nothing is done. A copy of the element is done through the copy constructor of the element T.

Parameters:

element A pointer to the element that is added

template<class T> void FullLinkedList< T >::Iterator::insertBeforeRef (T * element)

inserts a new element before the current element. The current element is unchanged. If the list is empty, a new list is created, the current element is set to the new element. If there is no current element, nothing is done. !! Only a reference is copied, use it with special care !!

Parameters:

element A pointer to the element that is added

template<class T> T* FullLinkedList< T >::Iterator::removeAndGetCurrent ()

removes the current element from the list and return the current element. If the current element doesn't exist, nothing is done and NULL is return. The new current Element will be the next element in the list, and NULL if the removed element was the last element of the list.

Returns:

A pointer to a copy of the element that has been removed

template<class T> void FullLinkedList< T >::Iterator::removeCurrent ()

removes the current element from the list. If the current element doesn't exist, nothing is done. The new current Element will be the next element in the list, and NULL if the removed element was the last element of the list.

Author

Generated automatically by Doxygen for LogService from the source code.

Info

Wed Feb 3 2016 LogService