![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ResizableCircularQueue.h>
Public Types | |
| typedef T | ElementT |
Public Member Functions | |
| TResizableCircularQueue (SIZE_T InitialCapacity) | |
| TResizableCircularQueue () | |
| ~TResizableCircularQueue () | |
| bool | IsEmpty () const |
| SIZE_T | Count () const |
| SIZE_T | AllocatedCapacity () const |
| void | Enqueue (const ElementT &SrcData) |
| ElementT & | EnqueueDefaulted_GetRef () |
| ElementT & | Enqueue_GetRef () |
| ElementT & | Enqueue () |
| void | Pop () |
| void | Pop (SIZE_T Count) |
| void | PopNoCheck () |
| void | PopNoCheck (SIZE_T Count) |
| const ElementT & | PeekAtOffset (SIZE_T Offset=0) const |
| ElementT & | PokeAtOffset (SIZE_T Offset=0) |
| const ElementT & | Peek () const |
| ElementT & | Poke () |
| const ElementT & | PeekAtOffsetNoCheck (SIZE_T Offset=0) const |
| ElementT & | PokeAtOffsetNoCheck (SIZE_T Offset=0) |
| const ElementT & | PeekNoCheck () const |
| void | Trim () |
| void | Reset () |
| void | Empty () |
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.
| typedef T TResizableCircularQueue< T, AllocatorT >::ElementT |
|
explicit |
Construct Empty Queue with the given initial Capacity, Capacity must be a power of two since we rely on unsigned arithmetics for wraparound
|
inline |
| TResizableCircularQueue< T, AllocatorT >::~TResizableCircularQueue | ( | ) |
|
inline |
Current allocated Capacity
|
inline |
Gets the number of elements in the queue.
| void TResizableCircularQueue< T, AllocatorT >::Empty | ( | ) |
Empty queue and release memory
| TResizableCircularQueue< T, AllocatorT >::ElementT & TResizableCircularQueue< T, AllocatorT >::Enqueue | ( | ) |
Push single element to the back of the Queue, returning a reference to it. POD types will not be initialized.
| void TResizableCircularQueue< T, AllocatorT >::Enqueue | ( | const ElementT & | SrcData | ) |
Push single element to the back of the Queue
| TResizableCircularQueue< T, AllocatorT >::ElementT & TResizableCircularQueue< T, AllocatorT >::Enqueue_GetRef | ( | ) |
Push single element to the back of the Queue, returning a reference to it. POD types will not be initialized.
| TResizableCircularQueue< T, AllocatorT >::ElementT & TResizableCircularQueue< T, AllocatorT >::EnqueueDefaulted_GetRef | ( | ) |
Push single default constructed element to the back of the Queue, returning a reference to it.
|
inline |
Returns true if the queue is empty
|
inline |
Peek at front element
|
inline |
Peek with the given offset from the front of the queue
|
inline |
Unchecked version, Peek with the given offset from the front of the queue
|
inline |
Peek at front element with no check
|
inline |
Peek at front element
|
inline |
Poke at the element with the given offset from the front of the queue
|
inline |
Unchecked version, Peek with the given offset from the front of the queue
| void TResizableCircularQueue< T, AllocatorT >::Pop | ( | ) |
Pop elements from the front of the queue
| void TResizableCircularQueue< T, AllocatorT >::Pop | ( | SIZE_T | Count | ) |
Pop Count elements from the front of the queue
| void TResizableCircularQueue< T, AllocatorT >::PopNoCheck | ( | ) |
Unchecked version, Pop a single element from the front of the queue
| void TResizableCircularQueue< T, AllocatorT >::PopNoCheck | ( | SIZE_T | Count | ) |
Unchecked version, Pop Count elements from the front of the queue
| void TResizableCircularQueue< T, AllocatorT >::Reset | ( | ) |
Empty queue without releasing memory
| void TResizableCircularQueue< T, AllocatorT >::Trim | ( | ) |
Trim memory usage to the next power of two for the current size