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

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new instance of the PseudoState class.

    Parameters

    • name: string

      The name of the pseudo state.

    • parent: State | Region

      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.

    • Default value kind: PseudoStateKind = PseudoStateKind.Initial

      The kind pseudo state which defines its behaviour and use.

    Returns PseudoState

Properties

isHistory

isHistory: boolean

kind

The kind pseudo state which defines its behaviour and use.

qualifiedName

qualifiedName: string

The fully qualified name of the element; a composition of the name of element and all its parent elements.

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.

    • Default value kind: TransitionKind = TransitionKind.External

      The kind of the transition, specifying its behaviour.

    Returns Transition<any>

    Returns a new untyped transition.

on

  • 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

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

    Parameters

    • target: Vertex

      The target of the transition.

    • Default value kind: TransitionKind = TransitionKind.External

      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

when

  • Creates a new transition at this vertex with a guard condition.

    Type parameters

    • TTrigger

      The type of the triggering event.

    Parameters

    • guard: Predicate<TTrigger>

      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