SmartTableKeptRow.h

A row held by its id, so code that acts a frame later still finds it.

Source/SmartTables/Public/SmartTableKeptRow.h

A row kept past the frame its number was read in.

A natural row number holds still only until rows arrive or leave, and then it names another row. The id outlives that. Anything that acts on a row in a later frame keeps one of these and finds the number again when it acts.

The id is only as good as the GetRowId of the model. The default names a row by its number, and then the two move together.

Struct
FSmartTableKeptRow
Members
3

Public functions 1

FindNow
int32 FindNow( int32 NumRows, TFunctionRef< FName( int32 ) > RowIdOf ) const

Where the row is now, in natural space, or INDEX_NONE once it left.

A row a few rows moved costs a few reads, and a row that left costs a read of every row. With one id on two rows, the one nearer NaturalRow wins.

Public variables 2

RowId
FName RowId
NaturalRow
int32 NaturalRow = INDEX_NONE

The number the row had when it was kept. Looked at first, and trusted only while its id matches.

Next: SmartTableRowSetDiff.h