UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TResizableCircularQueue< T, AllocatorT > Class Template Reference

#include <ResizableCircularQueue.h>

Public Types

typedefElementT
 

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)
 
ElementTEnqueueDefaulted_GetRef ()
 
ElementTEnqueue_GetRef ()
 
ElementTEnqueue ()
 
void Pop ()
 
void Pop (SIZE_T Count)
 
void PopNoCheck ()
 
void PopNoCheck (SIZE_T Count)
 
const ElementTPeekAtOffset (SIZE_T Offset=0) const
 
ElementTPokeAtOffset (SIZE_T Offset=0)
 
const ElementTPeek () const
 
ElementTPoke ()
 
const ElementTPeekAtOffsetNoCheck (SIZE_T Offset=0) const
 
ElementTPokeAtOffsetNoCheck (SIZE_T Offset=0)
 
const ElementTPeekNoCheck () const
 
void Trim ()
 
void Reset ()
 
void Empty ()
 

Detailed Description

template<typename T, typename AllocatorT = FDefaultAllocator>
class TResizableCircularQueue< T, AllocatorT >

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.

Member Typedef Documentation

◆ ElementT

template<typename T , typename AllocatorT = FDefaultAllocator>
typedef T TResizableCircularQueue< T, AllocatorT >::ElementT

Constructor & Destructor Documentation

◆ TResizableCircularQueue() [1/2]

Construct Empty Queue with the given initial Capacity, Capacity must be a power of two since we rely on unsigned arithmetics for wraparound

◆ TResizableCircularQueue() [2/2]

template<typename T , typename AllocatorT = FDefaultAllocator>
TResizableCircularQueue< T, AllocatorT >::TResizableCircularQueue ( )
inline

◆ ~TResizableCircularQueue()

Member Function Documentation

◆ AllocatedCapacity()

template<typename T , typename AllocatorT = FDefaultAllocator>
SIZE_T TResizableCircularQueue< T, AllocatorT >::AllocatedCapacity ( ) const
inline

Current allocated Capacity

◆ Count()

template<typename T , typename AllocatorT = FDefaultAllocator>
SIZE_T TResizableCircularQueue< T, AllocatorT >::Count ( ) const
inline

Gets the number of elements in the queue.

◆ Empty()

Empty queue and release memory

◆ Enqueue() [1/2]

Push single element to the back of the Queue, returning a reference to it. POD types will not be initialized.

See also
Enqueue_GetRef, EnqueueDefaulted_GetRef

◆ Enqueue() [2/2]

template<typename T , typename AllocatorT >
void TResizableCircularQueue< T, AllocatorT >::Enqueue ( const ElementT SrcData)

Push single element to the back of the Queue

◆ Enqueue_GetRef()

Push single element to the back of the Queue, returning a reference to it. POD types will not be initialized.

See also
EnqueueDefaulted_GetRef

◆ EnqueueDefaulted_GetRef()

Push single default constructed element to the back of the Queue, returning a reference to it.

See also
Enqueue_GetRef

◆ IsEmpty()

template<typename T , typename AllocatorT = FDefaultAllocator>
bool TResizableCircularQueue< T, AllocatorT >::IsEmpty ( ) const
inline

Returns true if the queue is empty

◆ Peek()

template<typename T , typename AllocatorT = FDefaultAllocator>
const ElementT & TResizableCircularQueue< T, AllocatorT >::Peek ( ) const
inline

Peek at front element

◆ PeekAtOffset()

template<typename T , typename AllocatorT = FDefaultAllocator>
const ElementT & TResizableCircularQueue< T, AllocatorT >::PeekAtOffset ( SIZE_T  Offset = 0) const
inline

Peek with the given offset from the front of the queue

◆ PeekAtOffsetNoCheck()

template<typename T , typename AllocatorT = FDefaultAllocator>
const ElementT & TResizableCircularQueue< T, AllocatorT >::PeekAtOffsetNoCheck ( SIZE_T  Offset = 0) const
inline

Unchecked version, Peek with the given offset from the front of the queue

◆ PeekNoCheck()

template<typename T , typename AllocatorT = FDefaultAllocator>
const ElementT & TResizableCircularQueue< T, AllocatorT >::PeekNoCheck ( ) const
inline

Peek at front element with no check

◆ Poke()

template<typename T , typename AllocatorT = FDefaultAllocator>
ElementT & TResizableCircularQueue< T, AllocatorT >::Poke ( )
inline

Peek at front element

◆ PokeAtOffset()

template<typename T , typename AllocatorT = FDefaultAllocator>
ElementT & TResizableCircularQueue< T, AllocatorT >::PokeAtOffset ( SIZE_T  Offset = 0)
inline

Poke at the element with the given offset from the front of the queue

◆ PokeAtOffsetNoCheck()

template<typename T , typename AllocatorT = FDefaultAllocator>
ElementT & TResizableCircularQueue< T, AllocatorT >::PokeAtOffsetNoCheck ( SIZE_T  Offset = 0)
inline

Unchecked version, Peek with the given offset from the front of the queue

◆ Pop() [1/2]

Pop elements from the front of the queue

◆ Pop() [2/2]

Pop Count elements from the front of the queue

◆ PopNoCheck() [1/2]

template<typename T , typename AllocatorT >
void TResizableCircularQueue< T, AllocatorT >::PopNoCheck ( )

Unchecked version, Pop a single element from the front of the queue

◆ PopNoCheck() [2/2]

template<typename T , typename AllocatorT >
void TResizableCircularQueue< T, AllocatorT >::PopNoCheck ( SIZE_T  Count)

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


The documentation for this class was generated from the following file: