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 Types | |
| typedef MemoryAllocator | AllocatorType | 
| typedef ElementHandler | ElementHandlerType | 
| typedef csFIFO< T, ElementHandler, MemoryAllocator > | ThisType | 
| typedef T | ValueType | 
| Public Member Functions | |
| 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 | Length () | 
| Return number of elements. | |
| T | PopTop () | 
| Return and remove the first element. | |
| void | Push (T const &what) | 
| Push an element onto the FIFO. | |
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
| bool csFIFO< T, ElementHandler, MemoryAllocator >::Delete | ( | T const & | what | ) |  [inline] | 
Linearly search for an item and delete it.
- Returns:
- Whether the item was found and subsequently deleled.
Definition at line 89 of file fifo.h.
References csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Delete().
| void csFIFO< T, ElementHandler, MemoryAllocator >::DeleteAll | ( | ) |  [inline] | 
Delete all items.
Definition at line 95 of file fifo.h.
References csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::DeleteAll().
| size_t csFIFO< T, ElementHandler, MemoryAllocator >::Length | ( | ) |  [inline] | 
Return number of elements.
Definition at line 80 of file fifo.h.
References csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Length().
| T csFIFO< T, ElementHandler, MemoryAllocator >::PopTop | ( | ) |  [inline] | 
Return and remove the first element.
Definition at line 56 of file fifo.h.
References CS_ASSERT, csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Empty(), csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Length(), csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Pop(), and csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Push().
| void csFIFO< T, ElementHandler, MemoryAllocator >::Push | ( | T const & | what | ) |  [inline] | 
Push an element onto the FIFO.
Definition at line 74 of file fifo.h.
References csArray< T, ElementHandler, MemoryAllocator, CapacityHandler >::Push().
The documentation for this class was generated from the following file:
- csutil/fifo.h
Generated for Crystal Space by doxygen 1.4.7

