CustomCompPorts Module
Types
| Type | Description |
Functions and values
| Function or value | Description |
Full Usage:
changeInstance comp change
Parameters:
Component
change : PortChange
Returns: Component
|
Return updated custom component with ports changed as per change If a port is deleted any corresponding connections must be deleted to keep the CanvasState consistent. That is done elsewhere, since deleting not fully connected connections is a straightforward operation on CanvasState, as done by deleteIncompleteConnections
|
|
|
Full Usage:
deleteIncompleteConnections (arg1, arg2)
Parameters:
Component list
arg1 : Connection list
Returns: Component list * Connection list
|
|
|
|
Full Usage:
getIOMatchFromSig (inputs, outputs)
Parameters:
(string * int) list
outputs : (string * int) list
Returns: Match list
|
|
|
Every instance of the current sheet, with the signature it has and the one it should have. An instance's bindings are expressions in the parameters of the sheet it SITS ON - and may be overridden there by a CustomCompParam slot, exactly as in elaboration - so the parent sheet is where they are evaluated. ParameterAnalysis.instanceBindingExprs is the same merge the properties pane and the simulator make.
|
|
|
Full Usage:
guessAtRenamedPorts matches
Parameters:
PortChange seq
Returns: PortChange array
|
|
|
Whether one instance is out of step with what its own bindings give it: it has a port the sheet does not, lacks one the sheet has, or holds one at the wrong width. The ORDER of the ports is deliberately not compared. An instance's ports are matched to the sheet's Input and Output components by LABEL - by FastCreate when a simulation is elaborated, by SynchronousUtils, and by CanvasStateAnalyser.checkCustomComponentForOkIOs, which compares sets when it decides whether a design is legal - and each port is drawn where the symbol's own saved PortOrder puts it, keyed by port id. So an instance whose ports are in a different order from the sheet's is a correct instance, and reordering it would change nothing that can be seen or simulated. Requiring the orders to match raised this dialog on four of the five shipped demos, whose instances were placed before the I/O components were moved about on their sheets, and described the difference as a width change - which is what the dialog says when nothing structural happened.
|
Full Usage:
ioCompareSigs (arg1, arg2) (arg3, arg4)
Parameters:
(string * int) list
arg1 : (string * int) list
arg2 : (string * int) list
arg3 : (string * int) list
Returns: PortChange seq
|
|
Full Usage:
listUpdate uPred uFunc lst
Parameters:
'a -> bool
uFunc : 'a -> 'a
lst : 'a list
Returns: 'a list
|
|
|
Every sheet has just been written to disk from memory, so none of them has unsaved changes. updateInstance flags each sheet it changes so that the change reaches disk; once it has, the flag has done its job. Left set it made every later "close without saving?" dialog name sheets whose files were already correct, and left the user no way to clear it: the Save button follows the OPEN sheet alone, and an instance is by construction never on that sheet.
|
Full Usage:
optCurrentSheetDependentsPopup model
Parameters:
Model
Returns: ((Msg -> Unit) -> Model -> ReactElement) option
|
|
Full Usage:
reportedChanges instances
Parameters:
Instance list
Returns: ReportedChange list * Instance list
|
What the user is being asked to confirm, gathered from every out-of-date instance: the ports that came and went, and which instances change only in width. The structural changes are taken over all instances rather than from a representative one. Instances of a parameterised sheet may be at different widths, so a rename can be guessed for one and not for another; the union is what the sheet's ports actually did.
|
|
|
|
|
|
|
|
|