|
| plMessageQueue (plAllocator *pAllocator) |
|
| plMessageQueue (const plMessageQueue< MetaDataType, AllocatorWrapper > &rhs) |
|
| plMessageQueue (const plMessageQueueBase< MetaDataType > &rhs) |
|
void | operator= (const plMessageQueue< MetaDataType, AllocatorWrapper > &rhs) |
|
void | operator= (const plMessageQueueBase< MetaDataType > &rhs) |
|
Entry & | operator[] (plUInt32 uiIndex) |
| Returns the element at the given index. Not thread safe.
|
|
const Entry & | operator[] (plUInt32 uiIndex) const |
| Returns the element at the given index. Not thread safe.
|
|
plUInt32 | GetCount () const |
| Returns the number of active elements in the queue.
|
|
bool | IsEmpty () const |
| Returns true, if the queue does not contain any elements.
|
|
void | Clear () |
| Destructs all elements and sets the count to zero. Does not deallocate any data.
|
|
void | Reserve (plUInt32 uiCount) |
| Expands the queue so it can at least store the given capacity.
|
|
void | Compact () |
| Tries to compact the array to avoid wasting memory.The resulting capacity is at least 'GetCount' (no elements get removed).
|
|
void | Enqueue (plMessage *pMessage, const MetaDataType &metaData) |
| Enqueues the given message and meta-data. This method is thread safe.
|
|
bool | TryDequeue (plMessage *&out_pMessage, MetaDataType &out_metaData) |
| Dequeues the first element if the queue is not empty and returns true. Returns false if the queue is empty. This method is thread safe.
|
|
bool | TryPeek (plMessage *&out_pMessage, MetaDataType &out_metaData) |
| Gives the first element if the queue is not empty and returns true. Returns false if the queue is empty. This method is thread safe.
|
|
Entry & | Peek () |
| Returns the first element in the queue. Not thread safe.
|
|
void | Dequeue () |
| Removes the first element from the queue. Not thread safe.
|
|
template<typename Comparer > |
void | Sort (const Comparer &comparer) |
| Sort with explicit comparer. Not thread safe.
|
|
void | Lock () |
| Acquires an exclusive lock on the queue. Do not use this method directly but use plLock instead.
|
|
void | Unlock () |
| Releases a lock that has been previously acquired. Do not use this method directly but use plLock instead.
|
|
template<typename Comparer > |
PL_ALWAYS_INLINE void | Sort (const Comparer &comparer) |
|
template<typename MetaDataType, typename AllocatorWrapper = plDefaultAllocatorWrapper>
class plMessageQueue< MetaDataType, AllocatorWrapper >
- See also
- plMessageQueueBase