13#include <initializer_list>
15template <
typename InElementType,
typename InAllocatorType = FDefaultAllocator>
28template <
typename InSizeType>
37template <
typename InElementType,
typename InSizeType>
51 : Data(Data), Range(Range), Offset(Offset)
68 return Data + Offset ==
Other.Data +
Other.Offset;
77template <
typename InElementType,
typename InSizeType>
88template <
typename InElementType,
typename InAllocatorType>
91 template <
typename AnyElementType,
typename AnyAllocatorType>
96 using SizeType =
typename InAllocatorType::SizeType;
100 AllocatorType::NeedsElementType,
102 typename AllocatorType::ForAnyElementType>;
117 : Capacity(Storage.GetInitialCapacity())
119 CopyUnchecked(
Other);
123 : Capacity(Storage.GetInitialCapacity())
150 CopyUnchecked(
Other);
164 CheckValidIndex(
Index);
170 CheckValidIndex(
Index);
189 return GetData()[Head];
195 return GetData()[Head];
221 return Storage.GetAllocatedSize(Capacity,
sizeof(
ElementType));
357 Head = Tail = Count = 0;
368 Storage.ResizeAllocation(0, 0,
sizeof(
ElementType));
369 Capacity = Storage.GetInitialCapacity();
389 return GetIterator(Head);
393 return GetIterator(Head);
397 return GetIterator(Head + Count);
401 return GetIterator(Head + Count);
413 return (
const ElementType*)Storage.GetAllocation();
452 void GrowIfRequired()
454 if (Count == Capacity)
456 Grow(Storage.CalculateSlackGrow(Count + 1, Capacity,
sizeof(
ElementType)));
475 Capacity =
Other.Storage.GetInitialCapacity();
479 void CopyUnchecked(std::initializer_list<ElementType>
InList)
491 Capacity = Storage.GetInitialCapacity();
504 Storage.MoveToEmpty(
Other.Storage);
505 Capacity =
Other.Capacity;
509 Other.Capacity =
Other.Storage.GetInitialCapacity();
514 Capacity =
Other.Storage.GetInitialCapacity();
548 ShiftElementsLeft(Count);
581 checkSlow((Count >= 0) & (Capacity >= Count));
582 if constexpr (AllocatorType::RequireRangeCheck)
611#if !PLATFORM_COMPILER_HAS_GENERATED_COMPARISON_OPERATORS
614 return !(*
this ==
Right);
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
#define UE_STATIC_ASSERT_WARN(bExpression, Message)
Definition CoreMiscDefines.h:431
@ InPlace
Definition CoreMiscDefines.h:162
FORCEINLINE constexpr void DestructItem(ElementType *Element)
Definition MemoryOps.h:56
FORCEINLINE constexpr void DestructItems(ElementType *Element, SizeType Count)
Definition MemoryOps.h:81
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTempIfPossible(T &&Obj) noexcept
Definition UnrealTemplate.h:538
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Offset
Definition VulkanMemory.cpp:4033
void Empty()
Definition Deque.h:363
void PopFirst()
Definition Deque.h:297
ElementType & First()
Definition Deque.h:192
void Reserve(SizeType InCount)
Definition Deque.h:376
UE_FORCEINLINE_HINT SizeType Max() const
Definition Deque.h:203
UE_FORCEINLINE_HINT IteratorType begin()
Definition Deque.h:391
UE::Deque::Private::TIterator< const ElementType, SizeType > ConstIteratorType
Definition Deque.h:104
TDeque()
Definition Deque.h:107
UE_FORCEINLINE_HINT void PushLast(const ElementType &Element)
Definition Deque.h:257
bool TryPopFirst(ElementType &OutValue)
Definition Deque.h:327
TDeque & operator=(std::initializer_list< ElementType > InList)
Definition Deque.h:155
std::conditional_t< AllocatorType::NeedsElementType, typename AllocatorType::template ForElementType< ElementType >, typename AllocatorType::ForAnyElementType > ElementAllocatorType
Definition Deque.h:102
InAllocatorType AllocatorType
Definition Deque.h:95
InElementType ElementType
Definition Deque.h:97
ElementType & EmplaceFirst(ArgsType &&... Args)
Definition Deque.h:244
bool TryPopLast(ElementType &OutValue)
Definition Deque.h:309
TDeque & operator=(const TDeque &Other)
Definition Deque.h:145
ElementType & Last()
Definition Deque.h:180
UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize() const
Definition Deque.h:219
void Reset()
Definition Deque.h:343
const ElementType & First() const
Definition Deque.h:186
UE_FORCEINLINE_HINT void PushFirst(ElementType &&Element)
Definition Deque.h:275
UE_FORCEINLINE_HINT SizeType Num() const
Definition Deque.h:208
TDeque(std::initializer_list< ElementType > InList)
Definition Deque.h:122
TDeque(const TDeque &Other)
Definition Deque.h:116
void PopLast()
Definition Deque.h:284
UE_FORCEINLINE_HINT IteratorType end()
Definition Deque.h:399
const ElementType & Last() const
Definition Deque.h:174
ElementType & EmplaceLast(ArgsType &&... Args)
Definition Deque.h:229
UE_FORCEINLINE_HINT bool IsEmpty() const
Definition Deque.h:198
const ElementType & operator[](SizeType Index) const
Definition Deque.h:162
TDeque(TDeque &&Other)
Definition Deque.h:111
UE_FORCEINLINE_HINT void PushLast(ElementType &&Element)
Definition Deque.h:262
~TDeque()
Definition Deque.h:128
UE_FORCEINLINE_HINT void PushFirst(const ElementType &Element)
Definition Deque.h:270
TDeque & operator=(TDeque &&Other)
Definition Deque.h:135
UE_FORCEINLINE_HINT ConstIteratorType begin() const
Definition Deque.h:387
bool operator!=(const TDeque &Right) const
Definition Deque.h:612
UE::Deque::Private::TIterator< ElementType, SizeType > IteratorType
Definition Deque.h:105
ElementType & operator[](SizeType Index)
Definition Deque.h:168
UE_FORCEINLINE_HINT ConstIteratorType end() const
Definition Deque.h:395
bool operator==(const TDeque &Right) const
Definition Deque.h:592
typename InAllocatorType::SizeType SizeType
Definition Deque.h:96
Definition IteratorAdapter.h:30
void Increment()
Definition Deque.h:60
InSizeType SizeType
Definition Deque.h:42
UE_FORCEINLINE_HINT ElementType & Dereference() const
Definition Deque.h:55
TIteratorBase(ElementType *Data, SizeType Range, SizeType Offset)
Definition Deque.h:50
UE_FORCEINLINE_HINT bool Equals(const TIteratorBase &Other) const
Definition Deque.h:66
InElementType ElementType
Definition Deque.h:41
@ Count
Definition AudioMixerDevice.h:90
Definition OverriddenPropertySet.cpp:45
UE_FORCEINLINE_HINT InSizeType WrapAround(InSizeType Index, InSizeType Range)
Definition Deque.h:29
Definition AdvancedWidgetsModule.cpp:13
U16 Index
Definition radfft.cpp:71