93 template<FColumnSorterInterface::ESortType SortType,
typename ColumnType>
99 template<
typename ColumnType>
161 template <
typename T>
164 template <
typename T>
173 std::is_same_v<T, FString> ||
174 std::is_same_v<T, FAnsiString> ||
175 std::is_same_v<T, FWideString> ||
176 std::is_same_v<T, FUtf8String>;
196 concept SortCase = std::is_same_v<T, FSortCaseSensitive> || std::is_same_v<T, FSortCaseInsensitive>;
198 template<SortCase Casing, Private::SortStringViewValue StringView>
202 static constexpr bool bIsCaseSensitive = std::is_same_v<Casing, FSortCaseSensitive>;
207 template<Private::SortStringViewCopyableType ViewType>
209 template<Private::SortStringViewCopyableType ViewType>
215 template<SortCase TargetCasing, Private::SortStringViewCopyableType ViewType>
217 template<SortCase TargetCasing>
230 template<SortCase Casing, Private::SortStringViewCopyableType View>
232 template<SortCase Casing>
246 template<ESortByNameFlags InFlags = ESortByNameFlags::Default>
253 template<ESortByNameFlags Flags>
257 concept SortBy = std::is_same_v<T, FSortById> || IsSortByName<T>::value;
262 constexpr static bool bIsById = std::is_same_v<By, FSortById>;
264 constexpr static bool bIsFixedSize = bIsById;
270 template<SortBy TargetBy>
273 uint32 GetByteSize()
const;
274 constexpr static uint32 GetElementSize();
288 mutable bool bIsCached =
false;
292 void CacheCompareType()
const;
298 template<
typename... ValueTypes>
313 template<
typename Numeric>
317 template<
typename ValueType>
321 static constexpr bool bIsSupportedType =
false;
325 static_assert(
sizeof(ValueType) == 0,
"Unsupported sort type.");
328 template<Private::SortNumericValue NumericType>
331 static constexpr bool bIsSupportedType =
true;
332 static constexpr bool bIsFixedSize =
true;
341 .
Prefix = Private::MoveToLocation(CurrentIndex - ByteIndex, Private::Rebase(
Value)),
342 .bHasRemainingBytes =
false
347 template<SortCase Casing,
typename T>
350 static constexpr bool bIsSupportedType =
true;
351 static constexpr bool bIsFixedSize =
false;
353 constexpr static uint32 GetElementSize();
361 static constexpr bool bIsSupportedType =
false;
362 static_assert(
sizeof(StringType) == 0,
363 "Strings and string views are not directly supported. Use `TSortStringView` to indicate if sorting is case sensitive or not.");
369 static constexpr bool bIsSupportedType =
true;
378 template<Private::NameValue NameType>
381 static constexpr bool bIsSupportedType =
false;
382 static_assert(
sizeof(
NameType) == 0,
383 "FNames are not directly supported. Use `TSortNameView` to indicate if sorting is based on a string or the unique FName number.");
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
bool operator<(const FTextFormatString &LHS, const FTextFormatString &RHS)
Definition ITextFormatArgumentModifier.h:147
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
UE_REWRITE constexpr bool operator>(const LhsType &Lhs, const RhsType &Rhs)
Definition UEOps.h:90
UE_REWRITE constexpr bool operator<=(const LhsType &Lhs, const RhsType &Rhs)
Definition UEOps.h:118
UE_REWRITE constexpr bool operator>=(const LhsType &Lhs, const RhsType &Rhs)
Definition UEOps.h:104
Definition NameTypes.h:617
Definition StringView.h:107
Definition TypedElementSorter.h:30
virtual int32 Compare(const ICoreProvider &Storage, RowHandle Left, RowHandle Right) const =0
virtual ~FColumnSorterInterface()=default
virtual FText GetShortName() const =0
virtual ESortType GetSortType() const =0
virtual FPrefixInfo CalculatePrefix(const ICoreProvider &Storage, RowHandle Row, uint32 ByteIndex) const =0
ESortType
Definition TypedElementSorter.h:35
Definition TypedElementDataStorageInterface.h:65
virtual ~TColumnSorterInterface() override=default
virtual ~TColumnSorterInterface() override=default
virtual ~TColumnSorterInterface() override=default
virtual ~TColumnSorterInterface() override=default
Definition TypedElementSorter.h:95
Definition TypedElementSorter.h:182
Definition TypedElementSorter.h:159
Definition TypedElementSorter.h:179
Definition TypedElementSorter.h:171
Definition TypedElementSorter.h:168
Definition TypedElementSorter.h:257
Definition TypedElementSorter.h:196
Type
Definition CString.h:21
@ IgnoreCase
Definition CString.h:26
@ CaseSensitive
Definition CString.h:23
Definition OverriddenPropertySet.cpp:45
Definition CommonTypes.cpp:10
ESortByNameFlags
Definition TypedElementSorter.h:238
FPrefixInfo CreateSortPrefix(uint32 ByteIndex, ValueTypes &&... Values)
Definition TypedElementSorter.inl:502
ENameSortBy
Definition TypedElementSorter.h:235
uint64 RowHandle
Definition Handles.h:15
Definition NumericLimits.h:41
Definition TypedElementSorter.h:23
uint64 Prefix
Definition TypedElementSorter.h:24
bool bHasRemainingBytes
Definition TypedElementSorter.h:25
Definition TypedElementSorter.h:249
Definition TypedElementSorter.h:194
Definition TypedElementSorter.h:193
Definition TypedElementSorter.h:252
Definition TypedElementSorter.h:162
Definition TypedElementSorter.h:247
Definition TypedElementSorter.h:261
TSortNameView(const FName &Name)
Definition TypedElementSorter.h:267
TSortNameView(TargetBy, const FName &Name)
Definition TypedElementSorter.h:271
std::conditional_t< bIsById, int32, FString > CompareType
Definition TypedElementSorter.h:263
Definition TypedElementSorter.h:200
TSortStringView()=default
bool operator==(const TSortStringView &Rhs) const
Definition TypedElementSorter.h:220
TSortStringView(TargetCasing, const ViewType &String)
Definition TypedElementSorter.h:216
TSortStringView(const ViewType &InView)
Definition TypedElementSorter.h:208
TSortStringView & operator=(const ViewType &InView)
Definition TypedElementSorter.h:210
bool operator!=(const TSortStringView &Rhs) const
Definition TypedElementSorter.h:221
TSortStringView(TargetCasing, const FText &Text)
Definition TypedElementSorter.h:218
bool operator<=(const TSortStringView &Rhs) const
Definition TypedElementSorter.h:223
TSortStringView(const FText &Text)
Definition TypedElementSorter.h:212
StringView View
Definition TypedElementSorter.h:227
StringView StringViewType
Definition TypedElementSorter.h:201
TSortStringView & operator=(const FText &Text)
Definition TypedElementSorter.h:213
bool operator>=(const TSortStringView &Rhs) const
Definition TypedElementSorter.h:225
static constexpr FPrefixInfo CalculatePrefix(int32 CurrentIndex, int32 ByteIndex, NumericType Value)
Definition TypedElementSorter.h:335
static constexpr uint32 GetElementSize()
Definition TypedElementSorter.h:334
static constexpr uint32 GetByteSize(NumericType Value)
Definition TypedElementSorter.h:333
static constexpr uint32 GetElementSize()
Definition TypedElementSorter.h:372
static FPrefixInfo CalculatePrefix(int32 CurrentIndex, int32 ByteIndex, TSortNameView< By > Value)
Definition TypedElementSorter.h:373
static uint32 GetByteSize(const TSortNameView< By > &Value)
Definition TypedElementSorter.h:371
Definition TypedElementSorter.h:319