SmartTableSortKey.h
What a column hands the sort. A number sorts as a number, not as its text.
The value of one cell, cut down to something that can be put in order.
Numeric is about being right and not about being quick. Compared as text, 1.25 and 1.5 read as the digit runs 25 and 5, and come out the wrong way round. A column takes its kind from the type of the member it binds and never from what its cell draws.
No UObject, no FText, no delegate. An array of these sorts on a worker thread.
- Struct
- FSmartTableSortKey
- Members
- 12
Public functions 6
A number, one or zero. One click sorts ascending, and zero leads, so false rows come first.
Gives back -1, 0 or 1. Which way a level is sorted, and where an empty key goes, both belong to the sort and cannot be read off from here.
Two kinds in one column are ORDERED by kind, in the order the kinds are declared: empty first, then every number, then every string. A tie there would be no order at all: call them equal and 5 == "a", "a" == 3, yet 5 > 3. The rows then land in whatever order the pairs happened to give.
A model reaches this with no bug of its own. Bindings resolve per item class, and Score as a float on one class with a string on another is two kinds in one column.
Public variables 3
Which of the two fields below means anything. Empty means neither.
Read only while Kind is Numeric.
Read only while Kind is String. Compared without case, with runs of digits read as numbers.
An FString and never an FText. A sort compares one column across every row, and comparing two FText values costs far more than comparing two pieces of plain text.
ESmartTableSortKeyKind enum
What a sort key holds, which decides how two of them are compared.
Values 3
No answer in this column. SortIndices places these last whichever way a level is sorted, and never asks Compare about one.
Compared as a number. A true or false value comes through here as one or zero.
Text, compared without case and with digit runs read as numbers.