Microsimulation API: ssim::SimErrorHandler Class Reference

Microsimulation API

Public Member Functions | List of all members
ssim::SimErrorHandler Class Reference

an error handler for simulation errors. More...

`#include <ssim.h>`

## Public Member Functions
virtual | ~SimErrorHandler ()
virtual void | clear () throw ()
| handles a clear operation. More...
virtual void | handle_busy (ProcessId p, const Event *e) throw ()
| handles busy-process conditions. More...
virtual void | handle_terminated (ProcessId p, const Event *e) throw ()
| handles terminated-process conditions. More...

## Detailed Description

an error handler for simulation errors.

Simulation errors occur when an event is scheduled for a process that is either terminated or busy processing other events. These conditions may or may not represent application errors. In any case, the simulator delegates the handling of these conditions to an error handler, which is implemented by extending this class.

See also
  Sim::set_error_handler(SimErrorHandler *)

Definition at line 251 of file ssim.h.

## Constructor & Destructor Documentation

## ◆ ~SimErrorHandler()

virtual ssim::SimErrorHandler::~SimErrorHandler | ( |  | ) |
| inlinevirtual

Definition at line 253 of file ssim.h.

## Member Function Documentation

## ◆ clear()

virtual void ssim::SimErrorHandler::clear | ( |  | ) |
throw | ( |
| ) |  |
| inlinevirtual

handles a clear operation.

This method is called by Sim::clear(). This enables any counters or other internal state of the error handler to be reset as necessary.

See also
  Sim::clear()

Definition at line 263 of file ssim.h.

## ◆ handle_busy()

virtual void ssim::SimErrorHandler::handle_busy | ( | ProcessId | p,
|  | const Event * | e
| ) |  |
throw | ( |
| ) |  |
| inlinevirtual

handles busy-process conditions.

A busy-process condition occurs when a process is scheduled to process an event at a time when it is still busy processing other events.

This method is executed within the simulation in the context of the busy process. This means that the handler may access the simulation's current time as well as all the interface functions of the simulator. In particular, this method may also signal events to the busy process (e.g., with self_signal_event()).

Parameters

  p | is the id of the busy process
  e | is the scheduled event (possibly NULL)

Definition at line 282 of file ssim.h.

## ◆ handle_terminated()

virtual void ssim::SimErrorHandler::handle_terminated | ( | ProcessId | p,
|  | const Event * | e
| ) |  |
throw | ( |
| ) |  |
| inlinevirtual

handles terminated-process conditions.

A terminated-process condition occurs when a process is scheduled to process an event at a time when it has already terminated its execution.

This method is executed within the simulation in the context of the busy process. This means that the handler may access the simulation's current time as well as all the interface functions of the simulator. In particular, this method may also signal events to the busy process (e.g., with self_signal_event()).

Parameters

  p | is the id of the terminated process
  e | is the scheduled event (possibly NULL)

Definition at line 301 of file ssim.h.

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

- /home/marcle/src/R/microsimulation/inst/include/siena/ssim.h