#include <list.h>
Inheritance diagram for List:
Public Methods | |
List (void) | |
A constructor. More... | |
virtual | ~List (void) |
A destructor. More... | |
virtual T_ * | first (void) |
Get pointer of the data of the first item. More... | |
virtual T_ * | last (void) |
Get pointer of the data of the last item. More... | |
virtual T_ * | current (void) |
Get pointer of the data of the current item. More... | |
virtual T_ * | next (void) |
Get pointer of the data of the next item. More... | |
virtual T_ * | prev (void) |
Get pointer of the data of the previous item. More... | |
virtual void | insert (T_ *item) |
Insert item at current position. More... | |
virtual void | append (T_ *item) |
Append item to the list. More... | |
virtual void | prepend (T_ *item) |
Prepend item to the list. More... | |
virtual T_ * | getFirst (void) |
Remove the first item of the list and return its data. More... | |
virtual bool | remove (void) |
Remove current item. More... | |
virtual bool | remove (T_ *item) |
Remove item with given data. More... | |
virtual bool | contains (T_ *item) |
Test if list contains given item. More... | |
virtual void | clear (void) |
Clear the list. More... | |
Protected Methods | |
virtual void | initList (void) |
Initialization of the list. | |
Protected Attributes | |
ListLinkedList< T_ > * | firstNode_ |
Pointer to the first node of the list. | |
ListLinkedList< T_ > * | lastNode_ |
Pointer to the last node of the list. | |
ListLinkedList< T_ > * | currentNode_ |
Pointer to the current node of the list. |
Definition at line 55 of file list.h.
|
A constructor.
Calls initList() |
|
A destructor.
Calls clear() |
|
Append item to the list.
The new item will become the current item.
Definition at line 244 of file list.h. Referenced by main. |
|
Clear the list.
If auto deletion is enabled, also the data of the items are removed from memory.
Implements Collection. Definition at line 446 of file list.h. Referenced by List< TestedRule >::~List. |
|
Test if list contains given item.
|
|
Get pointer of the data of the current item.
|
|
Get pointer of the data of the first item.
Definition at line 80 of file list.h. Referenced by main. |
|
Remove the first item of the list and return its data.
|
|
Insert item at current position.
The new item will become the current item. If current() is NULL, the will become the first item of the list.
|
|
Get pointer of the data of the last item.
|
|
Get pointer of the data of the next item.
This next item becomes the current item. If there is no next item, current item will be NULL.
Definition at line 138 of file list.h. Referenced by main. |
|
Prepend item to the list.
The new item will become the current item.
|
|
Get pointer of the data of the previous item.
This previous item becomes the current item. If there is no previous item, current item will be NULL.
|
|
Remove item with given data.
After removal, the current item will be the item following the removed one, or NULL. If auto deletion is enabled, also the data of the item are removed from memory.
|
|
Remove current item.
After removal, the current item will be the item following the removed one, or NULL. If auto deletion is enabled, also the data of the item are removed from memory.
Definition at line 341 of file list.h. Referenced by List< TestedRule >::remove. |