csFIFO< T, ElementHandler, MemoryAllocator > Class Template Reference
A FIFO implemented on top of csArray<>, but faster than using just a single array. More...
#include <csutil/fifo.h>
Public Member Functions | |
bool | Contains (T const &what) |
Linearly search for an item. | |
csFIFO (size_t icapacity=0, size_t ithreshold=0) | |
Construct the FIFO. | |
bool | Delete (T const &what) |
Linearly search for an item and delete it. | |
void | DeleteAll () |
Delete all items. | |
size_t | GetSize () |
Return the number of elements in the FIFO. | |
size_t | Length () |
Return the number of elements in the FIFO. | |
T | PopTop () |
Return and remove the first element. | |
void | Push (T const &what) |
Push an element onto the FIFO. | |
T & | Top () |
Return the first element. |
Detailed Description
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
class csFIFO< T, ElementHandler, MemoryAllocator >
A FIFO implemented on top of csArray<>, but faster than using just a single array.
Definition at line 35 of file fifo.h.
Constructor & Destructor Documentation
Member Function Documentation
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
bool csFIFO< T, ElementHandler, MemoryAllocator >::Contains | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
bool csFIFO< T, ElementHandler, MemoryAllocator >::Delete | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
void csFIFO< T, ElementHandler, MemoryAllocator >::DeleteAll | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
size_t csFIFO< T, ElementHandler, MemoryAllocator >::GetSize | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
size_t csFIFO< T, ElementHandler, MemoryAllocator >::Length | ( | ) | [inline] |
Return the number of elements in the FIFO.
- Deprecated:
- Use GetSize() instead.
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T csFIFO< T, ElementHandler, MemoryAllocator >::PopTop | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
void csFIFO< T, ElementHandler, MemoryAllocator >::Push | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Memory::AllocatorMalloc>
T& csFIFO< T, ElementHandler, MemoryAllocator >::Top | ( | ) | [inline] |
The documentation for this class was generated from the following file:
- csutil/fifo.h
Generated for Crystal Space 1.4.1 by doxygen 1.7.1