visman::components::visman_core::EventList
Overview
interface EventList extends Observable
Container managing all event to preset mappings.
Events define transitions from the current preset to other presets.
Operation Index
- createNew
-
Creates a new event with the given name.
- createDuplicate
-
Creates a duplicate of an existing event, including its
transition configuration and target preset.
- importFromJSON
-
Imports an event from a JSON representation.
- deleteEvent
-
Deletes the given event from the preset.
- deleteEventByName
-
Deletes an event by its name.
- asDictionary
-
Returns all events as a dictionary.
Operations
Creates a new event with the given name.
Parameters
- name
-
Name of the new event.
Return Value
The newly created Event instance.
Exceptions
- InvalidName
-
If the provided name does not meet naming rules.
- DuplicateEntity
-
If an event with the same name already exists.
Event* createDuplicate(Event* e)
Creates a duplicate of an existing event, including its
transition configuration and target preset.
Parameters
- e
-
The event to duplicate.
Return Value
The newly created duplicate Event.
Imports an event from a JSON representation.
Parameters
- json
-
JSON string describing an event.
Return Value
The imported Event instance.
Exceptions
- FormatError
-
If the JSON data is malformed or does not match the expected format.
- DuplicateEntity
-
If an event with the same name already exists.
void deleteEvent(Event* e)
Deletes the given event from the preset.
Parameters
- e
-
The event to delete.
void deleteEventByName(string event) throws InvalidName
Deletes an event by its name.
Parameters
- event
-
Name of the event to delete.
Exceptions
- InvalidName
-
If no event with the given name exists.
Returns all events as a dictionary.
Return Value
A dictionary mapping event names to their corresponding Event objects.