Detailed Description
template<class T>
class shogun::CList< T >
Class List implements a doubly connected list for low-level-objects.
For higher level objects pointers should be used. The list supports calling delete() of an object that is to be removed from the list.
Definition at line 54 of file List.h.
List of all members.
Constructor & Destructor Documentation
CList |
( |
bool |
p_delete_data = false |
) |
|
constructor
- Parameters:
-
| p_delete_data | if data shall be deleted |
Definition at line 61 of file List.h.
virtual ~CList |
( |
|
) |
[virtual] |
Member Function Documentation
bool append_element |
( |
T |
data |
) |
|
append element AFTER the current element
- Parameters:
-
| data | data element to append |
- Returns:
- if appending was successful
Definition at line 276 of file List.h.
bool append_element_at_listend |
( |
T |
data |
) |
|
append at end of list
- Parameters:
-
| data | data element to append |
- Returns:
- if appending was successful
Definition at line 319 of file List.h.
T delete_element |
( |
void |
|
) |
|
erases current element the new current element is the successor of the former current element
- Returns:
- the elements data - if available - is returned else NULL
Definition at line 382 of file List.h.
get current element in list
- Parameters:
-
| p_current | current list element |
- Returns:
- current element in list or NULL if not available
Definition at line 258 of file List.h.
T get_current_element |
( |
|
) |
|
get current element in list
- Returns:
- current element in list or NULL if not available
Definition at line 165 of file List.h.
go to first element in list and return it
- Returns:
- first element in list or NULL if list is empty
Definition at line 97 of file List.h.
go to first element in list and return it
- Parameters:
-
| p_current | current list element |
- Returns:
- first element in list or NULL if list is empty
Definition at line 186 of file List.h.
go to last element in list and return it
- Parameters:
-
| p_current | current list element |
- Returns:
- last element in list or NULL if list is empty
Definition at line 204 of file List.h.
go to last element in list and return it
- Returns:
- last element in list or NULL if list is empty
Definition at line 114 of file List.h.
virtual const char* get_name |
( |
|
) |
const [virtual] |
go to next element in list and return it
- Returns:
- next element in list or NULL if list is empty
Definition at line 131 of file List.h.
go to next element in list and return it
- Parameters:
-
| p_current | current list element |
- Returns:
- next element in list or NULL if list is empty
Definition at line 222 of file List.h.
int32_t get_num_elements |
( |
|
) |
|
get number of elements in list
- Returns:
- number of elements in list
Definition at line 91 of file List.h.
go to previous element in list and return it
- Parameters:
-
| p_current | current list element |
- Returns:
- previous element in list or NULL if list is empty
Definition at line 240 of file List.h.
T get_previous_element |
( |
|
) |
|
go to previous element in list and return it
- Returns:
- previous element in list or NULL if list is empty
Definition at line 148 of file List.h.
bool insert_element |
( |
T |
data |
) |
|
insert element BEFORE the current element
- Parameters:
-
| data | data element to insert |
- Returns:
- if inserting was successful
Definition at line 333 of file List.h.
The documentation for this class was generated from the following file: