@yantrix/automata v0.2.0 • Docs
Yantrix API / @yantrix/automata / BasicEventDictionary
Class: BasicEventDictionary
Basic event dictionary class that's used in Yantrix automatas.
Extends
AbstractEventDictionary<number,Record<number,any>, typeofAbstractBaseClass,this> &AbstractBaseClass<this>
Implements
IEventDictionary<TAutomataBaseEventType,Record<TAutomataBaseEventType,any>>
Methods
addEvents()
ts
addEvents(obj): number[]Add new Events to the dictionary, possibly scope them to namespace
Parameters
• obj: TEventKeysCollection<number>
object with list of keys to get events from and associated namespace
Returns
number[]
Array of added events
Implementation of
Inherited from
createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).addEvents
clearEvents()
ts
clearEvents(namespace?): thisremove all Events from the Dictionary, possibly scoping them to namespace.
Parameters
• namespace?: string
Returns
this
dictionary
Implementation of
Inherited from
createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).clearEvents
getEventKeys()
ts
getEventKeys(obj): (null | string)[]Get Keys of selected Events, possibly scoped to namespace
Parameters
• obj: TEventValuesCollection<number>
object with list of events to get keys for and associated namespace
Returns
(null | string)[]
Array of event keys
Implementation of
Inherited from
createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).getEventKeys
getEventValues()
ts
getEventValues(obj): (null | number)[]Get all Events for selected Keys, possibly scoped to namespace
Parameters
• obj: TEventKeysCollection<number>
object with list of keys to get events from and associated namespace
Returns
(null | number)[]
Array of event values
Implementation of
IEventDictionary.getEventValues
Inherited from
createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).getEventValues
removeEvents()
ts
removeEvents(obj): thisremove Events from the Dictionary, possibly scoping them to namespace.
Parameters
• obj: Partial<TEventKeysCollection<number> & TEventValuesCollection<number>>
object with namespace, list of events/keys to delete
Returns
this
dictionary
Implementation of
Inherited from
createEventDictionary<TAutomataBaseEventType, Record<TAutomataBaseEventType, any>>()(AbstractBaseClass).removeEvents