Simbody  3.7
SimTK::EventReporter Class Referenceabstract

An EventReporter is an object that defines an event that can occur within a system. More...

+ Inheritance diagram for SimTK::EventReporter:

Public Member Functions

virtual ~EventReporter ()
 
virtual void handleEvent (const State &state) const =0
 This method is invoked to handle the event. More...
 

Detailed Description

An EventReporter is an object that defines an event that can occur within a system.

It is an abstract class. Subclasses define how to determine when the event occurs, and what happens when it does. You will not generally subclass EventReporter directly. Instead, subclass ScheduledEventReporter (for events that occur at a particular time that is know in advance) or TriggeredEventReporter (for events that occur when some condition is satisfied within the system). ScheduledEventReporter also has another subclass, PeriodicEventReporter, for the common situation of events that occur at regular intervals.

EventReporter is very similar to EventHandler, but differs in that it is not permitted to modify the state of the system. It can observe the system's behavior, but not alter it. This means that adding an EventReporter to a System is not considered a change to the physical system it represents.

Once you have created an EventReporter, you can add it to a System by calling addEventReporter() on the System.

Constructor & Destructor Documentation

◆ ~EventReporter()

virtual SimTK::EventReporter::~EventReporter ( )
virtual

Member Function Documentation

◆ handleEvent()

virtual void SimTK::EventReporter::handleEvent ( const State state) const
pure virtual

This method is invoked to handle the event.

It is given a State which describes the system at the time when the event occurs.

Implemented in SimTK::Visualizer::Reporter, and SimTK::TextDataEventReporter.


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