Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PseudoState

A pseudo state is a transient state within a region, once entered it will exit immediately.

Hierarchy

  • Vertex
    • PseudoState

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new instance of the PseudoState class.

    Parameters

    • name: string

      The name of the pseudo state.

    • parent: Region | State

      The parent region of the pseudo state; note that a state can also be used, in which case the default region of the state will become the pseudo states parent.

    • kind: PseudoStateKind = ...

      The kind pseudo state which defines its behaviour and use.

    Returns PseudoState

Properties

Readonly kind

kind: PseudoStateKind = ...

Readonly name

name: string

Readonly parent

parent: Region

The parent region of the vertex.

Methods

accept

  • Accepts a visitor and calls back its visitPseudoState method.

    Parameters

    • visitor: Visitor

      The visitor to call back.

    Returns void

else

  • Creates an 'else' transition from this pseudo state, which will be chosen if no other outgoing transition is found.

    Parameters

    • target: Vertex

      The target of the transition.

    • kind: TransitionKind = ...

      The kind of the transition, specifying its behaviour.

    Returns Transition<any>

    Returns a new untyped transition.

on

  • on<TTrigger>(type: Constructor<TTrigger>): Transition<TTrigger>
  • Creates a new transition at this vertex triggered by an event of a specific type.

    Type parameters

    • TTrigger

      The type of the triggering event; note that this can be derived from the type parameter.

    Parameters

    • type: Constructor<TTrigger>

      The type (class name) of the triggering event.

    Returns Transition<TTrigger>

    Returns a new typed transition. A typed transition being one whose guard condition and behaviour will accept a parameter of the same type specified.

to

  • Creates a new transition from this vertex to the target vertex.

    Type parameters

    • TTrigger = any

      The type of the triggering event that the guard will evaluate.

    Parameters

    • target: Vertex

      The target of the transition.

    • kind: TransitionKind = ...

      The kind of the transition, specifying its behaviour.

    Returns Transition<any>

    Returns a new transition; if TTrigger is specified, a typed transition will be returned.

toString

  • toString(): string
  • Returns the element in string form; the fully qualified name of the element.

    Returns string

when

  • when<TTrigger>(guard: Function<TTrigger, boolean>): Transition<TTrigger>
  • Creates a new transition at this vertex with a guard condition.

    Type parameters

    • TTrigger = any

      The type of the triggering event.

    Parameters

    • guard: Function<TTrigger, boolean>

      The guard condition to determine if the transition should be traversed.

    Returns Transition<TTrigger>

    Returns a new transition; if TTrigger is specified, a typed transition will be returned.

Generated using TypeDoc