csList< T, MemoryAllocator > Class Template Reference
A lightweight double-linked list template. More...
#include <csutil/list.h>
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 (const csList< T, MemoryAllocator > &other) | |
| Copy constructor. | |
| csList (const MemoryAllocator &alloc) | |
| Construct with allocator setup. | |
| csList () | |
| Default constructor. | |
| bool | Delete (const T &item) |
| Remove specified item. | |
| void | Delete (Iterator &it) |
| Remove specific item by iterator. | |
| 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. | |
Detailed Description
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.
Constructor & Destructor Documentation
Member Function Documentation
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
| bool csList< T, MemoryAllocator >::Delete | ( | const T & | item | ) | [inline] |
template<class T , class MemoryAllocator >
| void csList< T, MemoryAllocator >::Delete | ( | ListElement * | el | ) | [inline, protected] |
template<class T , class MemoryAllocator >
| void csList< T, MemoryAllocator >::DeleteAll | ( | ) | [inline] |
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
| T& csList< T, MemoryAllocator >::Front | ( | ) | const [inline] |
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
| T& csList< T, MemoryAllocator >::Last | ( | ) | const [inline] |
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
| bool csList< T, MemoryAllocator >::PopBack | ( | ) | [inline] |
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
| bool csList< T, MemoryAllocator >::PopFront | ( | ) | [inline] |
Member Data Documentation
template<class T, class MemoryAllocator = CS::Memory::AllocatorMalloc>
const size_t csList< T, MemoryAllocator >::allocSize = sizeof (ListElement) [static] |
The documentation for this class was generated from the following file:
- csutil/list.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8
