Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Instance

Represents an instance of a state machine model at runtime; there can be many seperate state machine instances using a common model.

Hierarchy

  • Instance

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new state machine instance conforming to a particular state machine model.

    Parameters

    • name: string

      The name of the state machine instance.

    • root: State

      The root state of the state machine instance.

    Returns Instance

Properties

name

name: string

The name of the state machine instance.

root

root: State

The root state of the state machine instance.

Methods

evaluate

  • evaluate(trigger: any): boolean
  • Evaluates a trigger event to see if it causes a state transition.

    Parameters

    • trigger: any

      The trigger event to evaluate.

    Returns boolean

    Returns true if the trigger event caused a change in the active state configuration or was deferred.

getState

  • Returns the last known state of a region from the stable active state configuration.

    Parameters

    • region: Region

      The region to find the last know state of.

    Returns State | undefined

    Returns the last known state of the region or undefined if the region has not been entered.

toString

  • toString(): string
  • Returns the name of the state machine instance.

    Returns string

    Returns the name of the state machine instance.

Generated using TypeDoc