$darkmode
#include <trigger.hpp>
Public Member Functions | |
| virtual EventPtr | clone () const =0 |
| virtual void | to_json (fable::Json &) const =0 |
| Entity (std::string name) | |
| Entity (std::string name, std::string desc) | |
Public Member Functions inherited from cloe::Entity | |
| Entity (std::string name) | |
| Entity (std::string name, std::string desc) | |
| const std::string & | name () const |
| void | set_name (std::string name) |
| const std::string & | description () const |
| void | set_description (std::string desc) |
Protected Member Functions | |
| Logger | logger () const |
Friends | |
| void | to_json (fable::Json &j, const Event &e) |
Additional Inherited Members | |
Protected Attributes inherited from cloe::Entity | |
| std::string | name_ |
| std::string | desc_ |
Event represents the event/condition portion of a trigger, and is what causes an action to be executed.
It is created through an EventFactory, and registered with the simulation through the Registrar interface.
The primary identifying interface of an Event is through it's constructor, where it receives its name, together with the to_json(fable::Json&) method, where any further state is represented. This allows a new identical Event to be created.
The actual triggering of an Event is achieved through the Callback interface, in which Triggers with the corresponding event are contained.
|
pure virtual |
Clone this event with correct state information.
This happens when a sticky trigger evaluates to true.
Implemented in cloe::events::Transition< T >, cloe::events::Evaluate, and engine::events::TimeEvent.
|
inlineprotectedvirtual |
Return the Logger that the manager should use.
Reimplemented from cloe::Entity.
|
pure virtual |
Describe the event state so that the same event can be re-created through it's JSON representation with the corresponding EventFactory.