Table of Contents

Struct ColumnUsage

Namespace
Rinku.Mapping
Assembly
Rinku.dll

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

Span Span<bool>

Properties

LastIndexUsed

Gets the index of the last column claimed.

public readonly int LastIndexUsed { get; }

Property Value

int

Length

Gets the number of available columns.

public readonly int Length { get; }

Property Value

int

NbClaims

Gets the number of successful column claims, including reusable claims that did not consume their column.

public readonly int NbClaims { get; }

Property Value

int

NbUsed

Gets the number of distinct columns consumed by ordinary slots.

public readonly int NbUsed { get; }

Property Value

int

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

checkpoint Span<bool>
lastUsed int
nbClaims int

IsUsed(int)

Returns whether a column has been marked as used.

public readonly bool IsUsed(int ind)

Parameters

ind int

Returns

bool

Reuse(int)

Records a reusable claim without consuming the column, leaving it available to a later ordinary slot.

public void Reuse(int ind)

Parameters

ind int

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

checkpoint Span<bool>
lastUsed int
nbClaims int

Use(int)

Claims a column and prevents an ordinary later claim.

public void Use(int ind)

Parameters

ind int