CS::Container::InvasiveList< Tag > Class Template Reference
"Invasive" double-linked list. More...
#include <csutil/invasivelist.h>
Public Member Functions | |
| void | Delete (Element *item) |
| Delete an element from the list. | |
| bool | IsEmpty () const |
| Return if the list is empty. | |
| Element * | PopFront () |
| Remove and return the first element. | |
| void | PushBack (Element *item) |
| Push an element to the end of the list. | |
Detailed Description
template<typename Tag>
class CS::Container::InvasiveList< Tag >
"Invasive" double-linked list.
The list is invasive as all elements in the list have to be derived from, or have a member of, the Element class. However, this allows for more flexibility in the data structures you can construct - elements from the double-linked list can also be members of other structures simultaneously (e.g. hashes, or other linked list).
- Template Parameters:
-
Tag is an arbitrary type to distinguish different list types.
Definition at line 40 of file invasivelist.h.
Member Function Documentation
| void CS::Container::InvasiveList< Tag >::Delete | ( | Element * | item | ) | [inline] |
Delete an element from the list.
Definition at line 76 of file invasivelist.h.
| bool CS::Container::InvasiveList< Tag >::IsEmpty | ( | ) | const [inline] |
Return if the list is empty.
Definition at line 87 of file invasivelist.h.
| Element* CS::Container::InvasiveList< Tag >::PopFront | ( | ) | [inline] |
Remove and return the first element.
- Returns:
- Previous first element;
nullptrif list was empty.
Definition at line 68 of file invasivelist.h.
| void CS::Container::InvasiveList< Tag >::PushBack | ( | Element * | item | ) | [inline] |
Push an element to the end of the list.
Definition at line 56 of file invasivelist.h.
The documentation for this class was generated from the following file:
- csutil/invasivelist.h
Generated for Crystal Space 2.1 by doxygen 1.6.1
