#include <FullLinkedList.hh>
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.
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.
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 |
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 |
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 |
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 |
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
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.
The documentation for this class was generated from the following file: