Issie logo Issie

RegenerateIds Module

Rewriting the ids a sheet holds - when a sheet is copied into a project, and when a loaded sheet breaks an id invariant.

Functions and values

Function or value Description

admitDesign ldcs

Full Usage: admitDesign ldcs

Parameters:
Returns: LoadedComponent list * string list

Open a design: reset the allocators and admit every sheet in read order, so the same design gets the same ids each time it is opened. Returns the sheets and the names of any whose ids had to change.

ldcs : LoadedComponent list
Returns: LoadedComponent list * string list

admitSheet ldc

Full Usage: admitSheet ldc

Parameters:
Returns: LoadedComponent * bool

Admit a sheet into the open design, re-minting what breaks an invariant: a component id already used elsewhere in the design (component ids are design-unique), or any id that is a sentinel or duplicated within the sheet (per-sheet uniqueness is every kind's floor). Clean ids are reserved so later minting cannot collide with them. Returns the sheet and whether anything had to change.

ldc : LoadedComponent
Returns: LoadedComponent * bool

regenerateSheetIds ldc

Full Usage: regenerateSheetIds ldc

Parameters:
Returns: LoadedComponent

Give every component, port and connection on a sheet fresh ids from the design's allocators, rewriting every reference. Used when a sheet is copied into a project: Import / Duplicate Sheet, and library component materialisation.

ldc : LoadedComponent
Returns: LoadedComponent

remapCanvasState compMap portMap connMap (arg4, arg5)

Full Usage: remapCanvasState compMap portMap connMap (arg4, arg5)

Parameters:
Returns: CanvasState

Apply id maps - component, port and connection ids are separate namespaces, so separate maps - to a canvas: ids, host ids, symbol layout maps, parameter slots, endpoints.

compMap : Map<ComponentId, ComponentId>
portMap : Map<PortId, PortId>
connMap : Map<ConnectionId, ConnectionId>
arg3 : Component list
arg4 : Connection list
Returns: CanvasState

remapLoadedComponent compMap portMap connMap ldc

Full Usage: remapLoadedComponent compMap portMap connMap ldc

Parameters:
Returns: LoadedComponent

Apply id maps to everything a LoadedComponent holds: the canvas, the parameter slots and the saved waveform selection, which live on the LoadedComponent rather than in its CanvasState.

compMap : Map<ComponentId, ComponentId>
portMap : Map<PortId, PortId>
connMap : Map<ConnectionId, ConnectionId>
ldc : LoadedComponent
Returns: LoadedComponent

Type something to start searching.