$darkmode
cloe::Action Class Referenceabstract

#include <trigger.hpp>

Inheritance diagram for cloe::Action:
Collaboration diagram for cloe::Action:

Public Member Functions

virtual ActionPtr clone () const =0
 
virtual void operator() (const Sync &, TriggerRegistrar &)=0
 
virtual bool is_significant () const
 
virtual void to_json (fable::Json &j) 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 Action &a)
 

Additional Inherited Members

- Protected Attributes inherited from cloe::Entity
std::string name_
 
std::string desc_
 

Detailed Description

Action represents the action portion of a trigger, and is what is executed when a trigger condition evaluates true.

It is created through an ActionFactory, and registered with the simulation through the Registrar interface.

The primary identifying interface of an Action 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 Action to be created.

The execution is achieved through the function operator of the Action. Any further state required within the Action must be passed through the constructor of the Action.

See also
cloe/trigger/example_actions.hpp

Member Function Documentation

◆ clone()

virtual ActionPtr cloe::Action::clone ( ) const
pure virtual

◆ is_significant()

virtual bool cloe::Action::is_significant ( ) const
inlinevirtual

Return whether this action is a significant action.

All actions that have an effect on the result of a simulation are significant. Actions that are not significant are:

realtime_factor log

Insignificant actions are concealable, which removes them from the trigger history. This must be explicitly specified when inserting a trigger.

Reimplemented in cloe::actions::SetVariableAction< T >, cloe::actions::Bundle, cloe::actions::Log, and vtd::ScpAction.

◆ logger()

Logger cloe::Action::logger ( ) const
inlineprotectedvirtual

Return the Logger that the manager should use.

Reimplemented from cloe::Entity.

Here is the caller graph for this function:

◆ operator()()

◆ to_json()

virtual void cloe::Action::to_json ( fable::Json j) const
pure virtual

Describe the action state so that the same action can be re-created through it's JSON representation with the corresponding ActionFactory.


The documentation for this class was generated from the following file: