![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ModuloCircularBuffer.h>
Public Member Functions | |
| TModuloCircularBuffer (SIZE_T InNumSamples) | |
| void | Add (const T &InItem) |
| const T * | GetNextReplacedItem () const |
| SIZE_T | Capacity () const |
| SIZE_T | Num () const |
| bool | IsEmpty () const |
| bool | IsFull () const |
| TConstArrayView< T > | AsUnorderedView () const |
A circular buffer of any size (opposed to TCircularBuffer which requires power of 2).
The next index is computed using the modulo operation: NextIndexToInsert = (NextIndexToInsert + 1) % Data.Num(). It's less performant than bitmasking, which TCircularBuffer uses, but does not require any specific element count.
|
inlineexplicit |
|
inline |
Adds an item to the buffer. If the buffer is full, the oldest item is replaced.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |