csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler > 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 | |
| T & | Bottom () |
| Return the last element. | |
| bool | Contains (T const &what) |
| Linearly search for an item. | |
| csFIFO (size_t icapacity=0, const CapacityHandler &ch=CapacityHandler()) | |
| Construct the FIFO. | |
| bool | Delete (T const &what) |
| Linearly search for an item and delete it. | |
| void | DeleteAll () |
| Delete all items. | |
| size_t | GetSize () const |
| Return the number of elements in the FIFO. | |
| size_t | Length () const |
| Return the number of elements in the FIFO. | |
| T | PopBottom () |
| Return and remove the last element. | |
| 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::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
class csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >
A FIFO implemented on top of csArray, but faster than using just a single array.
Definition at line 36 of file fifo.h.
Constructor & Destructor Documentation
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::csFIFO | ( | size_t | icapacity = 0, |
|
| const CapacityHandler & | ch = CapacityHandler() | |||
| ) | [inline] |
Member Function Documentation
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| T& csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Bottom | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| bool csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Contains | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| bool csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Delete | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| void csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::DeleteAll | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| size_t csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::GetSize | ( | ) | const [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| size_t csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Length | ( | ) | const [inline] |
Return the number of elements in the FIFO.
- Deprecated:
- Use GetSize() instead.
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| T csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::PopBottom | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| T csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::PopTop | ( | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| void csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Push | ( | T const & | what | ) | [inline] |
template<class T, class ElementHandler = csArrayElementHandler<T>, class MemoryAllocator = CS::Container::ArrayAllocDefault, class CapacityHandler = csArrayCapacityFixedGrow<16>>
| T& csFIFO< T, ElementHandler, MemoryAllocator, CapacityHandler >::Top | ( | ) | [inline] |
The documentation for this class was generated from the following file:
- csutil/fifo.h
Generated for Crystal Space 2.0 by doxygen 1.6.1
