42template<
typename InElementType,
typename InSizeType>
50 static_assert(std::is_signed_v<SizeType>,
"TStridedView only supports signed index types");
56 UE_REQUIRES(std::is_convertible_v<OtherElementType**, ElementType* const*>)
63 check(NumElements >= 0);
64 check(BytesBetweenElements >= 0);
70 UE_REQUIRES(std::is_convertible_v<OtherElementType**, ElementType* const*>)
73 : FirstElementPtr(nullptr)
79 FirstElementPtr = &
Other[0];
90 return NumElements == 0;
100 return BytesBetweenElements;
105 return *GetElementPtrUnsafe(
Index);
110 return *GetElementPtr(
Index);
137 return !(*
this ==
Other);
155 using ByteType =
typename std::conditional_t<std::is_const_v<ElementType>,
const uint8,
uint8>;
166 return GetElementPtrUnsafe(
Index);
176template <
typename ElementType>
182template <
typename ElementType>
188template <
typename BaseStructureType,
typename DerivedStructureType>
191 static_assert(std::is_base_of_v<BaseStructureType, DerivedStructureType>,
"Expecting derived structure type");
195template <
typename BaseStructureType,
typename DerivedStructureType>
198 static_assert(std::is_base_of_v<BaseStructureType, DerivedStructureType>,
"Expecting derived structure type");
202template <
typename StructureType>
208template <
typename StructureType>
216 typename ElementType,
217 typename StructureType,
218 decltype(
GetData(std::declval<StructuredRangeType>()))* =
nullptr,
219 decltype(
GetNum(std::declval<StructuredRangeType>()))* =
nullptr
228 typename ElementType,
229 typename StructureType,
230 decltype(
GetData(std::declval<StructuredRangeType>()))* =
nullptr,
231 decltype(
GetNum(std::declval<StructuredRangeType>()))* =
nullptr
238template <
typename StructuredRangeType>
245template <
typename StructuredRangeType>
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_REQUIRES(...)
Definition Requires.h:86
TStridedView< BaseStructureType > MakeStridedViewOfBase(TArrayView< DerivedStructureType > StructuredView)
Definition StridedView.h:189
TStridedView< ElementType > MakeStridedView(int32 BytesBetweenElements, ElementType *FirstElement, int32 Count)
Definition StridedView.h:177
TConstStridedView< ElementType > MakeConstStridedView(int32 BytesBetweenElements, const ElementType *FirstElement, int32 Count)
Definition StridedView.h:183
TConstStridedView< BaseStructureType > MakeConstStridedViewOfBase(TConstArrayView< DerivedStructureType > StructuredView)
Definition StridedView.h:196
auto GetNum(const TStringConversion< Converter, DefaultConversionSize > &Conversion) -> decltype(Conversion.Length())
Definition StringConv.h:808
auto GetData(const TStringConversion< Converter, DefaultConversionSize > &Conversion) -> decltype(Conversion.Get())
Definition StringConv.h:802
Definition ArrayView.h:139
Definition StridedView.h:44
UE_FORCEINLINE_HINT bool IsEmpty() const
Definition StridedView.h:88
UE_FORCEINLINE_HINT SizeType GetStride() const
Definition StridedView.h:98
UE_FORCEINLINE_HINT FIterator begin() const
Definition StridedView.h:143
InElementType ElementType
Definition StridedView.h:47
TStridedView(SizeType InBytesBetweenElements, OtherElementType *InFirstElementPtr, SizeType InNumElements)
Definition StridedView.h:58
InSizeType SizeType
Definition StridedView.h:48
UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition StridedView.h:83
UE_FORCEINLINE_HINT FIterator end() const
Definition StridedView.h:144
UE_FORCEINLINE_HINT ElementType & operator[](SizeType Index) const
Definition StridedView.h:108
TStridedView(const TStridedView< OtherElementType, SizeType > &Other)
Definition StridedView.h:72
UE_FORCEINLINE_HINT ElementType & GetUnsafe(SizeType Index) const
Definition StridedView.h:103
UE_FORCEINLINE_HINT SizeType Num() const
Definition StridedView.h:93
ByteType
Definition PacketView.h:38
U16 Index
Definition radfft.cpp:71
Definition StridedView.h:114
UE_FORCEINLINE_HINT bool operator!=(const FIterator &Other) const
Definition StridedView.h:135
const TStridedView * Owner
Definition StridedView.h:115
SizeType Index
Definition StridedView.h:116
bool operator==(const FIterator &Other) const
Definition StridedView.h:129
UE_FORCEINLINE_HINT ElementType & operator*()
Definition StridedView.h:124
UE_FORCEINLINE_HINT FIterator & operator++()
Definition StridedView.h:118