engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TResizableCircularQueue< T, AllocatorT > 模板类 参考

Simple ResizableCircularQueue. 更多...

#include <ResizableCircularQueue.h>

Public 成员函数

SIZE_T AllocatedCapacity () const
 Current allocated Capacity
 
SIZE_T Count () const
 Gets the number of elements in the queue.
 
void Empty ()
 Empty queue and release memory
 
ElementT & Enqueue ()
 Push single element to the back of the Queue, returning a reference to it. 更多...
 
void Enqueue (const ElementT &SrcData)
 Push single element to the back of the Queue
 
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. 更多...
 
bool IsEmpty () const
 Returns true if the queue is empty
 
const ElementT & Peek () const
 Peek at front element
 
const ElementT & PeekAtOffset (SIZE_T Offset=0) const
 Peek with the given offset from the front of the queue
 
const ElementT & PeekAtOffsetNoCheck (SIZE_T Offset=0) const
 Unchecked version, Peek with the given offset from the front of the queue
 
const ElementT & PeekNoCheck () const
 Peek at front element with no check
 
ElementT & Poke ()
 Peek at front element
 
ElementT & PokeAtOffset (SIZE_T Offset=0)
 Poke at the element with the given offset from the front of the queue
 
ElementT & PokeAtOffsetNoCheck (SIZE_T Offset=0)
 Unchecked version, Peek with the given offset from the front of the queue
 
void Pop ()
 Pop elements from the front of the queue
 
void Pop (SIZE_T Count)
 Pop Count elements from the front of the queue
 
void PopNoCheck ()
 Unchecked version, Pop a single element from the front of the queue
 
void PopNoCheck (SIZE_T Count)
 Unchecked version, Pop Count elements from the front of the queue
 
void Reset ()
 Empty queue without releasing memory
 
 TResizableCircularQueue (SIZE_T InitialCapacity)
 Construct Empty Queue with the given initial Capacity, Capacity must be a power of two since we rely on unsigned arithmetics for wraparound
 
void Trim ()
 Trim memory usage to the next power of two for the current size
 

详细描述

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.

成员函数说明

◆ Enqueue()

template<typename T , typename AllocatorT >
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.

参见
Enqueue_GetRef, EnqueueDefaulted_GetRef

◆ Enqueue_GetRef()

template<typename T , typename AllocatorT >
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.

参见
EnqueueDefaulted_GetRef

◆ EnqueueDefaulted_GetRef()

template<typename T , typename AllocatorT >
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.

参见
Enqueue_GetRef

该类的文档由以下文件生成: