AllocatorBase

Description

abstract class Tinman.Engine.Rendering.Util.AllocatorBase
<TCount val>
<TCoords val>
<TRange val>

Derived from

IAllocator<TCount, TCoords, TRange>

Extended by

Allocator1D sealed
Allocator2D sealed

Abstract base class for IAllocator implementations.

Protected / Methods

Block​Align


[EmptyBody]
protected virtual method BlockAlign → (1)

slot in : int32

The base slot index.

returns → int32

The aligned slot index, which must be greater than or equal to slot in.

Aligns the given slot index before allocation.

Block​Allocate


protected method BlockAllocate → (1)

count in : int32

The number of slots to allocate.

returns → int32

The slot index of the allocation start or -1 if the allocation has failed.

Allocates a slot range.

Block​Clear


protected virtual method BlockClear → (2)

block in : int32

The block index.

slot in : int32

The slot index to set.

Clears a block.

Block​Compute


protected virtual method BlockCompute → (3)

block in : int32

The block index.

slot in : int32

Slot index of the allocation start.

count in : int32

The slot count of the allocation.

Computes the block values.

Block​Insert


protected virtual method BlockInsert → (2)

index in : int32

The block index of the insertion.

count in : int32

The number of block entries to insert.

Inserts a sequence of block entries.

Block​Move


protected virtual method BlockMove → (2)

source in : int32

The source block index.

target in : int32

The target block index.

Moves a range of blocks.

Slot​To​Block


[Pure]
protected method SlotToBlock → (1)

slot in : int32

Index of a slot.

returns → int32

The block index or -1 if none.

Returns the block index for the given slot index.

Protected / Attributes

block​Count


protected attribute blockCount → (int32)

The number of valid entries in blocks.

blocks


protected attribute blocks → (int32 [ ])

The slot index N of the end of this slot block (exclusive) if it is an allocation or -N if it is a free range.

size


protected readonly attribute size → (int32)

The value of IAllocator.Size.