Requires
Classes
Type Definitions
Cfg
A configuration object for a finite state machine
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
mixins |
Mixins | Used to extend the functionalities of the finite state machine. |
descriptor |
FsmDescriptor | The initial data. |
- Source:
Defaults
Descriptors defining the default values for each inner class
When passing a descriptor through the add
method,
it checks for every property defined in the respective default
descriptor. If the value of such property is missing, it is replaced
by the one in the default descriptor.
Type:
Properties:
Name | Type | Description |
---|---|---|
symbols |
Descriptor | Default descriptor for the symbols. |
states |
Descriptor | Default descriptor for the states. |
transitions |
Descriptor | Default descriptor for the transitions. |
- Source:
FsmDescriptor
Descriptor for the data of a finite state machine
Each property should hold an array of descriptors that will be passed
to the respective add
method at instanciation.
The from
, to
and by
fields of the transitions' descriptors should
hold the indexes of the corresponding state or symbol in the other arrays.
Type:
Properties:
Name | Type | Description |
---|---|---|
symbols |
Array.<Descriptor> | An array of descriptors used to create the symbols. |
states |
Array.<Descriptor> | An array of descriptors used to create the states. |
transitions |
Array.<Descriptor> | An array of descriptors used to create the transitions. Beware of the
|
- Source:
Mixins
Mixins to be applied on the inner classes of a finite state machine.
Each inner class is replaced by the output of the corresponding mixin. This is used to augment the functionalities before instanciation. Make sure to keep every method defined.
Properties:
Name | Type | Description |
---|---|---|
symbols |
Mixin | The mixin that will be applied on |
states |
Mixin | The mixin that will be applied on |
transitions |
Mixin | The mixin that will be applied on |
- Source: