4template<
typename ElementType>
9 if (InitialCapacity > 0)
15template<
typename ElementType>
18 Elements[Head] = Element;
19 ElementType&
EntryRef = Elements[Head];
21 Head = GetNextIndex(Head);
22 bIsFull |= (Head == 0);
27template<
typename ElementType>
32 const uint32 CurrentSize = Elements.Num();
43template<
typename ElementType>
47 return Elements[AsInternalIndex(
Index)];
50template<
typename ElementType>
54 return Elements[AsInternalIndex(
Index)];
57template<
typename ElementType>
63 if (!IsFull() ||
Index < Capacity() - 1)
80 Elements[0] = Elements.Last();
91 Elements[TargetIndex] = Element;
95template<
typename ElementType>
98 return Elements.Num();
101template<
typename ElementType>
114template<
typename ElementType>
121template<
typename ElementType>
124 return (Head == 0) && !bIsFull;
127template<
typename ElementType>
133template<
typename ElementType>
141template<
typename ElementType>
147 return (
Index < Head) ? (Head -
Index - 1) : bIsFull ? (Elements.
Num() - 1 -
Index + Head) : 0;
150template<
typename ElementType>
153 return ((CurrentIndex + 1) % Elements.Num());
156template<
typename ElementType>
165 Head = Elements.Num();
172template<
typename ElementType>
182 ElementType* BufferPtr = Elements.GetData();
190 FMemory::Memcpy(BufferPtr, BufferPtr + Head,
sizeof(ElementType) * Head);
199template<
typename ElementType>
219 Elements.RemoveAt(Head, Elements.Num() - Head);
#define checkSlow(expr)
Definition AssertionMacros.h:332
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT SizeType AddUninitialized()
Definition Array.h:1664
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
Definition MotionDelayBuffer.h:73
bool IsFull() const
Definition MotionDelayBuffer.inl:128
int32 Num() const
Definition MotionDelayBuffer.inl:102
bool IsEmpty() const
Definition MotionDelayBuffer.inl:122
TCircularHistoryBuffer(uint32 InitialCapacity=0)
Definition MotionDelayBuffer.inl:5
uint32 Capacity() const
Definition MotionDelayBuffer.inl:96
ElementType & operator[](uint32 Index)
Definition MotionDelayBuffer.inl:44
void Resize(uint32 NewCapacity)
Definition MotionDelayBuffer.inl:28
void InsertAt(uint32 Index, const ElementType &Element)
Definition MotionDelayBuffer.inl:58
void Empty()
Definition MotionDelayBuffer.inl:115
ElementType & Add(const ElementType &Element)
Definition MotionDelayBuffer.inl:16
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
static UE_FORCEINLINE_HINT void * Memmove(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:109
static UE_FORCEINLINE_HINT void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:160