#include <list.h>
Public Methods | |
| list_c () | |
| c'tor | |
| virtual | ~list_c () |
| d'tor | |
| void | add_first (T *data) |
| Add an element at the beginning. | |
| void | append (T *data) |
| Add an element at the end. | |
| void | add_aftercurrent (T *data) |
| Add an element after the current element. | |
| void | add_beforecurrent (T *data) |
| Add an element before the current element. | |
| long | get_count () |
| Get element count. | |
| T * | get_first () |
| Get first element. | |
| T * | get_last () |
| Get last element. | |
| T * | get_current () |
| Get current element. | |
| T * | get_next () |
| Get next element. | |
| T * | get_prev () |
| Get previous element. | |
| void | set_current (T *ptr) |
| Set active element. | |
| void | set_current_num (ulong n) |
| Set active element. | |
| void | remove (T *ptr) |
| Remove element from list. | |
Protected Attributes | |
| entry_t< T > * | first |
| start of list | |
| entry_t< T > * | last |
| ent of list | |
| entry_t< T > * | current |
| currently active entry | |
| long | count |
| number of entries | |
Definition at line 53 of file list.h.
|
|
Inserts the element data after the currently active element. If no element is active, the element is just added using append(). |
|
|
Inserts the element data before the currently active element. If no element is active, the element is just added using add_first(). |
|
|
Inserts the element data before the beginning of the list. Existing elements are shifted to the end. Definition at line 105 of file list.h. Referenced by list_c< shader_s >::add_beforecurrent(). |
|
|
Inserts the element data after the end of the list. Definition at line 136 of file list.h. Referenced by list_c< shader_s >::add_aftercurrent(). |
|
|
Returns the total number of elements stored in the list. Definition at line 233 of file list.h. Referenced by path_c::get_count(). |
|
|
Returns the currently active element in list. If the list is empty or no element is active NULL is returned. |
|
|
Returns the first element in list. If the list is empty NULL is returned. Also makes the returned element the currently active. Definition at line 244 of file list.h. Referenced by list_c< shader_s >::set_current(), and list_c< shader_s >::set_current_num(). |
|
|
Returns the last element in list. If the list is empty NULL is returned. Also makes the returned element the currently active. |
|
|
Returns the next element in list following the currently active element. If the list is empty or no element is active NULL is returned. Also makes the returned element the currently active. Definition at line 282 of file list.h. Referenced by list_c< shader_s >::set_current(), and list_c< shader_s >::set_current_num(). |
|
|
Returns the previous element in list before the currently active element. If the list is empty or no element is active NULL is returned. Also makes the returned element the currently active. |
|
|
Find the element \ptr and makes remove it from the list. After calling this function no element will be the active one. |
|
|
Find the element ptr and makes it the currently active. If ptr is not found there is no active element. Definition at line 310 of file list.h. Referenced by list_c< shader_s >::remove(). |
|
|
Find the n 'th element and makes it the currently active. If n is larger than the number of elements the last element of the list will be selected. |
1.2.18