Struct ColumnUsage
Tracks which result columns a mapping plan has claimed.
public ref struct ColumnUsage
- Inherited Members
Constructors
ColumnUsage(Span<bool>)
Tracks which result columns a mapping plan has claimed.
public ColumnUsage(Span<bool> Span)
Parameters
Properties
LastIndexUsed
Gets the index of the last column claimed.
public readonly int LastIndexUsed { get; }
Property Value
Length
Gets the number of available columns.
public readonly int Length { get; }
Property Value
NbClaims
Gets the number of successful column claims, including reusable claims that did not consume their column.
public readonly int NbClaims { get; }
Property Value
NbUsed
Gets the number of distinct columns consumed by ordinary slots.
public readonly int NbUsed { get; }
Property Value
Methods
InitCheckpoint(Span<bool>, out int, out int)
Copies the current usage into a checkpoint that can be passed to Rollback(scoped Span<bool>, int, int).
public readonly void InitCheckpoint(Span<bool> checkpoint, out int lastUsed, out int nbClaims)
Parameters
IsUsed(int)
Returns whether a column has been marked as used.
public readonly bool IsUsed(int ind)
Parameters
indint
Returns
Reuse(int)
Records a reusable claim without consuming the column, leaving it available to a later ordinary slot.
public void Reuse(int ind)
Parameters
indint
Rollback(scoped Span<bool>, int, int)
Restores a checkpoint created by InitCheckpoint(Span<bool>, out int, out int).
public void Rollback(scoped Span<bool> checkpoint, int lastUsed, int nbClaims)
Parameters
Use(int)
Claims a column and prevents an ordinary later claim.
public void Use(int ind)
Parameters
indint