creates an new empty list.
Copy constructor Element T must be have a copy constructor
Destroyes the list. The list will be emptied. All elements will be freed.
Append the list given in argument to the end of the list. The list given in argument is copied using the defaut construcotr by copy of its element T.
- Parameters
-
list | The list which is append to the end of the current list. The list will be consumed by the call |
destroyes all the element of the list. The list becomes an empty list. The Elements of the nodes are freed. Acquires write lock.
Creates an iterator which controls the linked list. All the access on the list is blocked until the iterator is destroyed. Provides read and write access. Can be reduced to a ReadIterator
- Returns
- an iterator that exclusively accesses the list until it is destroyed
Creates a iterator which has only readaccess to the list. All write access to the list is blocked until the iterator is destroyed.
- Returns
- an iterator that provides readaccess to the list until it is destroyed
pop an element from the list. The element is removed from the end of the list and is returned. Returns NULL if the list is empty
- Returns
- The element that has been removed
Push an element on the list. The Element is stored at the end of the list. A copy of the element is done using the copy constructor
- Parameters
-
element | a pointer on the element to be added |
Push an element on the list. The Element is stored at the end of the list. !! Only the reference to the element is stored !! Be very carrefull when using this function !
- Parameters
-
element | a pointer on the element to be added |
Releases the write lock of an readWrite iterator, making it an ReadIterator. The read lock stays all the time. The original iterator will be destroyed and cannot be used any more after this operation.
- Parameters
-
rwIterator | the iterator to release |
- Returns
- an iterator with readonly access to the list
Shift an element in the list. The Element is stored at the begin of the list. A copy of the element is done using the copy constructor
- Parameters
-
element | a pointer on the element to be added |
Shift an element in the list. The Element is stored at the begin of the list. !! Only the reference to the element is stored !! Be very carrefull when using this function !
- Parameters
-
element | a pointer on the element to be added |
unshift an element from the list. The element is removed from the begin of the list and is returned. Returns NULL if the list is empty
- Returns
- The element that has been removed
The documentation for this class was generated from the following file: