Module |
|
Header |
/Engine/Source/Runtime/Net/Core/Public/Net/Core/Misc/ResizableCircularQueue.h |
Include |
#include "Net/Core/Misc/ResizableCircularQueue.h" |
template<typename T, typename AllocatorT>
class TResizableCircularQueue
Simple ResizableCircularQueue. Relies on unsigned arithmetics and ever increasing head and tail indices to avoid having to store an extra element or maintain explicit empty state.
InitialCapacity must be a power of two.
Name | Description | |
---|---|---|
|
TResizableCircularQueue() |
|
|
TResizableCircularQueue ( |
Construct Empty Queue with the given initial Capacity, Capacity must be a power of two since we rely on unsigned arithmetics for wraparound |
Name | Description | |
---|---|---|
|
~TResizableCircularQueue() |
Name | Description | ||
---|---|---|---|
|
AllocatedCapacity() |
Current allocated Capacity |
|
|
Count() |
Gets the number of elements in the queue. |
|
|
Empty() |
Empty queue and release memory |
|
|
Enqueue ( |
Push single element to the back of the Queue |
|
|
ElementT & |
Enqueue() |
Push single element to the back of the Queue, returning a reference to it. |
|
ElementT & |
Enqueue_GetRef() |
Push single element to the back of the Queue, returning a reference to it. |
|
ElementT & |
EnqueueDefaulted_GetRef() |
Push single default constructed element to the back of the Queue, returning a reference to it. |
|
IsEmpty() |
Returns true if the queue is empty |
|
|
const Elemen... |
Peek() |
Peek at front element |
|
const Elemen... |
PeekAtOffset ( |
Peek with the given offset from the front of the queue |
|
const Elemen... |
PeekAtOffsetNoCheck ( |
Unchecked version, Peek with the given offset from the front of the queue |
|
const Elemen... |
PeekNoCheck() |
Peek at front element with no check |
|
ElementT & |
Poke() |
Peek at front element |
|
ElementT & |
PokeAtOffset ( |
Poke at the element with the given offset from the front of the queue |
|
ElementT & |
PokeAtOffsetNoCheck ( |
Unchecked version, Peek with the given offset from the front of the queue |
|
Pop() |
Pop elements from the front of the queue |
|
|
Pop ( |
Pop Count elements from the front of the queue |
|
|
PopNoCheck() |
Unchecked version, Pop a single element from the front of the queue |
|
|
PopNoCheck ( |
Unchecked version, Pop Count elements from the front of the queue |
|
|
Reset() |
Empty queue without releasing memory |
|
|
Trim() |
Trim memory usage to the next power of two for the current size |
Name |
Description |
---|---|
bConstructElements |
|
bDestructElements |