LogService
libdadi: utility tools for distributed applications
|
#include <FullLinkedList.hh>
Public Member Functions | |
virtual | ~ReadIterator () |
void | reset () |
void | resetToLast () |
bool | hasCurrent () |
bool | hasNext () |
bool | hasPrevious () |
T * | getCurrent () |
T * | getCurrentRef () |
T * | next () |
T * | nextRef () |
T * | previous () |
T * | previousRef () |
unsigned int | length () |
Protected Member Functions | |
ReadIterator (FullLinkedList *controlledList) | |
Protected Attributes | |
FullLinkedList * | linkedList |
Node * | currentNode |
bool | noReadRelease |
Friends | |
class | FullLinkedList |
Allows readaccess to the linked list. Several readers can exist parallel, but no writer will disturb the reading. The iterators lock on the list will be removed when the iterator is deleted.
|
virtual |
Releases all locks that this mutex has acquired. If the internal variable noReadRelease is set to true, the readLock is not releases. This allows the reduceWriteIterator in the FullLinkedList to delete an Iterator without loosing the readLock.
|
explicitprotected |
Creates a new ReadIterator. Can only be invoked by functions of FullLinkedList. Assumes the readMutex is already locked. Does not lock the readMutex itself
|
inline |
Gets the current element. Return NULL if there is no current element. A copy of the current element is returned.
|
inline |
Gets the current element. Return NULL if there is no current element. A reference of the current element is returned. This reference is only valid while the iterator exists. !! Be very carrefull when using this method !!
|
inline |
returns true if there is a current element
|
inline |
returns true if there is a next element. If the current element does not exist, false is returned.
|
inline |
returns true if there is a previous element. If the current element does not exist, false is returned.
|
inline |
Gets the current length of the list.
|
inline |
Iterates to the next element if the possible. A copy of the current element is returned.
|
inline |
Iterates to the next element if the possible. A reference of the current element is returned. !! Be very carrefull when using this method !!
|
inline |
Iterates to the previous element if the possible. A copy of the current element is returned.
|
inline |
Iterates to the previous element if the possible. A reference of the current element is returned. !! Be very carrefull when using this method !!
|
inline |
Set the currentElement of the iterator to the first element of the list
|
inline |
Set the currentElement of the iterator to the last element of the list
|
protected |
the current Node of the iterator
|
protected |
contains the linked list this iterator controlls
|
protected |
Controlls the behaviour of unlocking the blocked mutexes when releaseLocks() is called. This is initialized to false, as usually all locks should be released. This value is set to true by the reduceWriteIterator() to allow the creation of a new Iterator without releasing the readlock