Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Containers/CircularBuffer.h |
Include |
#include "Containers/CircularBuffer.h" |
template<typename ElementType>
class TCircularBuffer
Template for circular buffers.
The size of the buffer is rounded up to the next power of two in order speed up indexing operations using a simple bit mask instead of the commonly used modulus operator that may be slow on some platforms.
Name | Description | |
---|---|---|
|
TCircularBuffer ( |
Creates and initializes a new instance of the TCircularBuffer class. |
|
TCircularBuffer ( |
Creates and initializes a new instance of the TCircularBuffer class. |
Name | Description | ||
---|---|---|---|
|
Capacity() |
Returns the number of elements that the buffer can hold. |
|
|
GetNextIndex ( |
Calculates the index that follows the given index. |
|
|
GetPreviousIndex ( |
Calculates the index previous to the given index. |
Name | Description | ||
---|---|---|---|
|
ElementType ... |
operator[] ( |
Returns the mutable element at the specified index. |
|
const Elemen... |
operator[] ( |
Returns the immutable element at the specified index. |