Options
All
  • Public
  • Public/Protected
  • All
Menu

Module \mmir-tooling\src\scxml

Index

Type aliases

DocumentStringToModel

DocumentStringToModel:

FixedDocumentStringToModel

FixedDocumentStringToModel: DocumentStringToModel & { __handleRawModule: DocumentStringToModel; handleRawModule: HandleRawModule }

HandleRawModule

HandleRawModule: (url: string, rawModule: any, ...args: any[]) => void

Type declaration

    • (url: string, rawModule: any, ...args: any[]): void
    • Parameters

      • url: string
      • rawModule: any
      • Rest ...args: any[]

      Returns void

RawModule

RawModule: { datamodel?: any; module: { _children: { add: (code: any) => void }[] } }

Type declaration

  • Optional datamodel?: any
  • module: { _children: { add: (code: any) => void }[] }
    • _children: { add: (code: any) => void }[]

ScxmlCompiler

ScxmlCompiler: typeof scxml

ScxmlError

ScxmlError: { column: number; line: number; reason: string; tagname: string }

Type declaration

  • column: number
  • line: number
  • reason: string
  • tagname: string

Variables

Const AMD_PREFIX

AMD_PREFIX: "define(["module"], function(module){" = "define(["module"], function(module){"

Const AMD_SUFFIX

AMD_SUFFIX: "});" = "});"

Const DEFAULT_MODE

DEFAULT_MODE: "extended" = "extended"

Const MODULE_CODE_PREFIX

MODULE_CODE_PREFIX: "var ScxmlModel = " = "var ScxmlModel = "

Const MODULE_CODE_SUFFIX

MODULE_CODE_SUFFIX: string = ';\n' +'ScxmlModel.prepare = function(prepareCallback, executionContext, hostContext) {' + //TODO support optional arguments executionContext & hostContext?//NOTE use setTimeout() for simulating async execution:'if(!prepareCallback) return; setTimeout(function(){prepareCallback(null, ScxmlModel)}, 0);' +'};\nmodule.exports = ScxmlModel;'

Prepares an scxml model for execution by binding it to an execution context

param

Callback to execute with the prepared model or an error The prepared model is a function to be passed into a SCION StateChart object

param

The execution context (e.g. v8 VM sandbox). If a vm.Context object is provided, then the compiled SCXML module code is evaluated in that context. Otherwise, if a regular object is provided, then the given object is "contextified", which means that it is passed to vm.createContext to create a new execution context. Object keys are exposed as global variables on the new context in which the generated SCXML module code is evaluated.

param

Context provided by the interpreter host

Const STRICT_MODE

STRICT_MODE: ""use strict";" = ""use strict";"

Const log

log: any = logUtils.log

Const warn

warn: any = logUtils.warn

Const warn

warn: any = logUtils.warn

Functions

addDefaults

  • add (minimal) default state models for 'dialog' and/or 'input'

    Parameters

    • kind: StateModelMode | "minimal" | ""

      the mode for the create default models, specified and other than 'minimal', a warning will be printed

    • list: StateModelBuildEntry[]

      INOUT parameter: the list of state model entries, to which the created default models will be added

    • _appRootDir: string

      this path to app's root directory

    Returns void

addFromOptions

compile

  • compile an SCXML file to exectuable scion statechart model

    Parameters

    • content: string

      the SCXML definition as string

    • scxmlFile: string

      the path of the SCXML file (for debugging/error information)

    • options: StateCompilerOptions

      the ScxmlLoadOptions with property mapping (list of ScxmlOptions)

    • callback: CompilerCallback

      the callback when SCXML compilation has been completed: callback(error | null, compiledStatechart, map, meta)

    • _map: any
    • _meta: any

    Returns void

contains

fixRawCompileInjectDataModule

isScxmlError

  • isScxmlError(err: Error | ScxmlError): err is ScxmlError

readDir

toAliasId

toAliasPath

toError

  • toError(errList: ScxmlError | Error | Array<ScxmlError | Error>, file: string, _map: any, _meta: any): Error

Generated using TypeDoc