roadrunner  2.6.0
Fast simulator for SBML models
Public Types | Public Member Functions | List of all members
rr::EventListener Class Referenceabstract

Notifies the user of SBML events. More...

#include <rrExecutableModel.h>

Public Types

enum  Result { HALT_SIMULATION = (0x1 << 0) }
 

Public Member Functions

virtual uint onTrigger (ExecutableModel *model, size_t eventIndex, const std::string &eventId)=0
 
virtual uint onAssignment (ExecutableModel *model, size_t eventIndex, const std::string &eventId)=0
 

Detailed Description

Notifies the user of SBML events.

RoadRunner has the capatiblity to notify user objects of any sbml event.

In order to listen to sbml events, one simply implements the EventHandler interface and resgisters it with the ExecutableModel::setEventHandler method.

To remove it, just pass in a 0.

EventHanders are free to change any model parameters.

They may return a result value specified by the Result enum. Currently, we we only have the HALT_SIMULATION which will result in RoadRunner::oneStep or RoadRunner::simulate to stop at the current time and return. This may be usefull if someone wants to run a simulation up until some threshold or state is reached.


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