Classes |
class | Iterator |
| Iterator for the list. More...
|
struct | ListElement |
| Template which describes the data stored in the linked list For example a list of ints uses ListElement<int>. More...
|
Public Member Functions |
| csList () |
| Default constructor.
|
| csList (const MemoryAllocator &alloc) |
| Construct with allocator setup.
|
| csList (const csList< T, MemoryAllocator > &other) |
| Copy constructor.
|
void | Delete (Iterator &it) |
| Remove specific item by iterator.
|
bool | Delete (const T &item) |
| Remove specified item.
|
void | DeleteAll () |
| Empty an list.
|
T & | Front () const |
| Return first element of the list.
|
void | InsertAfter (Iterator &it, const T &item) |
| Insert an item after the item the iterator is set to.
|
void | InsertBefore (Iterator &it, const T &item) |
| Insert an item before the item the iterator is set to.
|
T & | Last () const |
| Return last element of the list.
|
void | MoveAfter (const Iterator &it, const Iterator &item) |
| Move an item (as iterator item ) after the item the iterator it is set to.
|
void | MoveBefore (const Iterator &it, const Iterator &item) |
| Move an item (as iterator item) before the item the iterator it is set to.
|
void | MoveToBack (const Iterator &item) |
| Move an item (as iterator item) to the front of the list.
|
void | MoveToFront (const Iterator &item) |
| Move an item (as iterator item) to the front of the list.
|
csList & | operator= (const csList< T, MemoryAllocator > &other) |
| Assignment, deep-copy.
|
bool | PopBack () |
| Deletes the last element of the list.
|
bool | PopFront () |
| Deletes the first element of the list.
|
Iterator | PushBack (const T &item) |
| Add an item last in list. Copy T into the listdata.
|
Iterator | PushFront (const T &item) |
| Add an item first in list. Copy T into the listdata.
|
| ~csList () |
| Destructor.
|
Static Public Attributes |
static const size_t | allocSize = sizeof (ListElement) |
| This is the size of the memory block the wrapper list uses to store the actual data.
|
Protected Member Functions |
void | Delete (ListElement *el) |
| Remove specific item by explicit ref.
|
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
class csList< T, MemoryAllocator >
A lightweight double-linked list template.
Copies the elements into the list for storages. Assumes that type T supports copy construction.
Definition at line 36 of file list.h.