![]() |
Documentation 6b54b78464
|
A queue-type container (push back, pop front), but with fast deletion of arbitrary items (possibly in the middle). More...
#include <CFastFindAndEraseQueue.hpp>
Public Types | |
| enum | { ErasedValue = ErasedValue_ } |
| using | ItemType = ItemType_ |
| using | Iterator = typename std::vector< ItemType >::const_iterator |
Public Member Functions | |
| CFastFindAndEraseQueue ()=default | |
| Default construct. | |
| CFastFindAndEraseQueue (size_t N) | |
| Construct and initialize with [0,N) range. | |
| size_t | size () const |
| bool | empty () const |
| Iterator | begin () const |
| Iterator | end () const |
| void | push_back (ItemType value) |
| Push back an item, that should be unique. | |
| ItemType | front () const |
| Get the item in front of the queue. | |
| bool | findAndErase (const ItemType value) |
| Main event, look for an item and erase it if present. | |
A queue-type container (push back, pop front), but with fast deletion of arbitrary items (possibly in the middle).
| [in] | ItemType_ | - Type of the stored items. |
| [in] | ErasedValue_ | - Value used to mark items for erasure. |
| [in] | CleanupThreshold | - Number of marked items that triggers full cleanup. |
| using CFastFindAndEraseQueue< ItemType_, ErasedValue_, CleanupThreshold >::ItemType = ItemType_ |
| using CFastFindAndEraseQueue< ItemType_, ErasedValue_, CleanupThreshold >::Iterator = typename std::vector<ItemType>::const_iterator |
| anonymous enum |
|
default |
Default construct.
|
inline |
Construct and initialize with [0,N) range.
|
inline |
|
inline |
|
inline |
|
inline |
Main event, look for an item and erase it if present.
| [in] | value | - Item to look for. |
|
inline |
Get the item in front of the queue.
|
inline |
Push back an item, that should be unique.
| [in] | value | - The new item. |
|
inline |