Header menu logo issie

ModelHelpers Module

Types and nested modules

Type/Module Description

Constants

CSSGridPos

type used for CSS grids in the UI to position an item on a grid

ViewableJob

a long function to be executed in a message after the view function has run at least once

Functions and values

Function or value Description

asyncJobs

Full Usage: asyncJobs

Returns: ViewableJob list

list of jobs awaiting execution

Returns: ViewableJob list

drawBlockModelToUserData model userData

Full Usage: drawBlockModelToUserData model userData

Parameters:
Returns: UserData

This is needed because DrawBlock cannot directly access Issie Model. can be replaced when all Model is placed at start of compile order and DB model is refactored

model : Model
userData : UserData
Returns: UserData

execOneAsyncJobIfPossible (model, cmd)

Full Usage: execOneAsyncJobIfPossible (model, cmd)

Parameters:
Returns: Model * Cmd<Msg>

called from update function, it will execute outstanding async jobs. each job modifies model.

model : Model
cmd : Cmd<Msg>
Returns: Model * Cmd<Msg>

getComponentIds model

Full Usage: getComponentIds model

Parameters:
Returns: Set<ComponentId>
model : Model
Returns: Set<ComponentId>

getCurrFile model

Full Usage: getCurrFile model

Parameters:
Returns: string option

returns a string option representing the current file name if file is loaded, otherwise None

model : Model
Returns: string option

getCurrSheets model

Full Usage: getCurrSheets model

Parameters:
Returns: string list option
model : Model
Returns: string list option

getSavedWaveInfo wsModel

Full Usage: getSavedWaveInfo wsModel

Parameters:
Returns: SavedWaveInfo

Get saveable record of WaveSimModel

wsModel : WaveSimModel
Returns: SavedWaveInfo

getUpdatedLoadedComponents project model

Full Usage: getUpdatedLoadedComponents project model

Parameters:
Returns: Project

Return the project with with open file contents in loadedcomponents updated according to current Draw Block contents.

project : Project
model : Model
Returns: Project

getWSModel model

Full Usage: getWSModel model

Parameters:
Returns: WaveSimModel

Get the current WaveSimModel used by the Model (index the map using the current wavesim sheet). If no WaveSimModel for that sheet, return an empty wave sim model.

model : Model
Returns: WaveSimModel

initWSModel

Full Usage: initWSModel

Returns: WaveSimModel
Returns: WaveSimModel

loadWSModelFromSavedWaveInfo swInfo

Full Usage: loadWSModelFromSavedWaveInfo swInfo

Parameters:
Returns: WaveSimModel

Setup current WaveSimModel from saved record NB: note that SavedWaveInfo can only be changed if code is added to make loading backwards compatible with old designs

swInfo : SavedWaveInfo
Returns: WaveSimModel

mapFst mapFn (model, cmd)

Full Usage: mapFst mapFn (model, cmd)

Parameters:
    mapFn : 'a -> 'b
    model : 'a
    cmd : 'c

Returns: 'b * 'c
mapFn : 'a -> 'b
model : 'a
cmd : 'c
Returns: 'b * 'c

mapOverProject defaultValue model transform

Full Usage: mapOverProject defaultValue model transform

Parameters:
Returns: 'a
defaultValue : 'a
model : Model
transform : Project -> 'a
Returns: 'a

pp model

Full Usage: pp model

Parameters:
model : Model

reduce this

Full Usage: reduce this

Parameters:
Returns: (type)
this : Model
Returns: (type)

reduceApprox this

Full Usage: reduceApprox this

Parameters:
Returns: (type)
this : Model
Returns: (type)

removeAllSimulationsFromModel model

Full Usage: removeAllSimulationsFromModel model

Parameters:
Returns: Model

For reasons of space efficiency, ensure that no non-empty unused FastSimulation records are kept FastSimulation records can be very large and at most one should exist, it must be for the sheet referenced by model.WaveSimSheet

model : Model
Returns: Model

runAfterView jobName workFn

Full Usage: runAfterView jobName workFn

Parameters:
jobName : string
workFn : Model -> Model * Cmd<Msg>

setAsyncJobsRunnable dispatch

Full Usage: setAsyncJobsRunnable dispatch

Parameters:
    dispatch : Msg -> unit

dispatch : Msg -> unit

setWSModel wsModel model

Full Usage: setWSModel wsModel model

Parameters:
Returns: Model

Set WaveSimModel of current sheet.

wsModel : WaveSimModel
model : Model
Returns: Model

spCanvas model

Full Usage: spCanvas model

Parameters:
Returns: string
model : Model
Returns: string

spComp comp

Full Usage: spComp comp

Parameters:
Returns: string
comp : Component
Returns: string

spComps comps

Full Usage: spComps comps

Parameters:
Returns: string
comps : Component list
Returns: string

spConn conn

Full Usage: spConn conn

Parameters:
Returns: string
conn : Connection
Returns: string

spLdComp ldc

Full Usage: spLdComp ldc

Parameters:
Returns: string
ldc : LoadedComponent
Returns: string

spMess msg

Full Usage: spMess msg

Parameters:
    msg : 'a

Returns: string
msg : 'a
Returns: string

spOpt f thingOpt

Full Usage: spOpt f thingOpt

Parameters:
    f : 'a -> string
    thingOpt : 'a option

Returns: string
f : 'a -> string
thingOpt : 'a option
Returns: string

spProj p

Full Usage: spProj p

Parameters:
Returns: string
p : Project
Returns: string

spState (arg1, arg2)

Full Usage: spState (arg1, arg2)

Parameters:
Returns: string
arg0 : Component list
arg1 : Connection list
Returns: string

tryGetLoadedComponents model

Full Usage: tryGetLoadedComponents model

Parameters:
Returns: LoadedComponent list
model : Model
Returns: LoadedComponent list

updateLdComps name changeFun ldComps

Full Usage: updateLdComps name changeFun ldComps

Parameters:
Returns: LoadedComponent list
name : string
changeFun : LoadedComponent -> LoadedComponent
ldComps : LoadedComponent list
Returns: LoadedComponent list

updateLdCompsWithCompOpt newCompOpt ldComps

Full Usage: updateLdCompsWithCompOpt newCompOpt ldComps

Parameters:
Returns: LoadedComponent list
newCompOpt : LoadedComponent option
ldComps : LoadedComponent list
Returns: LoadedComponent list

updateWSModel updateFn model

Full Usage: updateWSModel updateFn model

Parameters:
Returns: Model

Update WaveSimModel of current sheet.

updateFn : WaveSimModel -> WaveSimModel
model : Model
Returns: Model

updateWSModelOfSheet sheet updateFn model

Full Usage: updateWSModelOfSheet sheet updateFn model

Parameters:
Returns: Model

Update WaveSimModel of given sheet - if it does not exist do nothing

sheet : string
updateFn : WaveSimModel -> WaveSimModel
model : Model
Returns: Model

userDataToDrawBlockModel model

Full Usage: userDataToDrawBlockModel model

Parameters:
Returns: Model

This is needed because DrawBlock cannot directly access Issie Model. can be replaced when all Model is placed at start of compile order and DB model is refactored

model : Model
Returns: Model

Type something to start searching.