Class: SlotManager

olympe.df. SlotManager

A slot manager makes possible to register slot of a certain size, at a specific rank. It returns the start position of the new slot as a dataflow.

Slots can be valid and invalid: A slot is valid if its rank r arrives after r-1 other slots already defined. If the rank is not defined, then it will automatically fill the empty slots with them.

A slot becomes "valid"


new SlotManager()

Methods


getNumberEntries()

Gets the total number of valid slots in this SlotManager.

Returns:

Number of valid slots

Type
olympe.df.PONumber

getSize()

Gets the total size of all the slots of this manager.

Returns:

This slot manager total size

Type
olympe.df.PONumber

move(id, rank)

Move the slot associated by the id to the specified rank

Parameters:
Name Type Description
id string
rank number

registerSlot(id [, size] [, rank])

Register a slot of the specified size, at the end of the slot manager.

Parameters:
Name Type Argument Default Description
id string

slot identifier

size olympe.df.PONumber <optional>
olympe.df.ONumber.ONE

the slot size

rank olympe.df.PONumber | number <optional>

if not defined, auto manage the rank.

Returns:

the start position of the new slot

Type
olympe.df.PONumber

releaseAllSlots()

Releases all the slots in this SlotManager.


releaseSlot(id)

Remove the slot with the specified id, if exist

Parameters:
Name Type Description
id string

the slot id to release