OpenASIP
2.0
|
#include <ProximRuntimeErrorHandler.hh>
Public Member Functions | |
ProximRuntimeErrorHandler (SimulatorFrontend &frontend, wxEvtHandler &gui) | |
~ProximRuntimeErrorHandler () | |
virtual void | handleEvent () |
Public Member Functions inherited from Listener | |
Listener () | |
virtual | ~Listener () |
virtual void | handleEvent (int event) |
Private Attributes | |
SimulatorFrontend & | frontend_ |
Simulator frontend to stop when a fatal error occurs. More... | |
wxEvtHandler & | gui_ |
GUI to send the simulator events to. More... | |
A class which handles simulation runtime errors in Proxim.
The errors are reported to the GUI using SimulatorEvents, and the simultion is stopped id necessary.
Definition at line 47 of file ProximRuntimeErrorHandler.hh.
ProximRuntimeErrorHandler::ProximRuntimeErrorHandler | ( | SimulatorFrontend & | frontend, |
wxEvtHandler & | gui | ||
) |
The Constructor.
The created error handler is registered automatically as simulator event handler listener.
frontend | Simulator frontend to stop when a fatal error occurs. |
gui | GUI to send the error events to. |
Definition at line 50 of file ProximRuntimeErrorHandler.cc.
References SimulatorFrontend::eventHandler(), Informer::registerListener(), and SimulationEventHandler::SE_RUNTIME_ERROR.
ProximRuntimeErrorHandler::~ProximRuntimeErrorHandler | ( | ) |
The Destructor.
Definition at line 64 of file ProximRuntimeErrorHandler.cc.
References SimulatorFrontend::eventHandler(), frontend_, SimulationEventHandler::SE_RUNTIME_ERROR, and Informer::unregisterListener().
|
virtual |
Handles simulator runtime errors.
This event handler sends a SimulatorEvent to the GUI when a runtime error occurs. An error message explaining the error is sent as the event string payload. If a fatal error occured, the simulator is stopped.
Reimplemented from Listener.
Definition at line 78 of file ProximRuntimeErrorHandler.cc.
References SimulatorFrontend::clearProgramErrorReports(), SimulatorEvent::EVT_SIMULATOR_RUNTIME_ERROR, SimulatorEvent::EVT_SIMULATOR_RUNTIME_WARNING, frontend_, gui_, SimulatorFrontend::prepareToStop(), SimulatorFrontend::programErrorReport(), SimulatorFrontend::programErrorReportCount(), SimulatorFrontend::RES_FATAL, SimulatorFrontend::RES_MINOR, and SRE_RUNTIME_ERROR.
|
private |
Simulator frontend to stop when a fatal error occurs.
Definition at line 58 of file ProximRuntimeErrorHandler.hh.
Referenced by handleEvent(), and ~ProximRuntimeErrorHandler().
|
private |
GUI to send the simulator events to.
Definition at line 60 of file ProximRuntimeErrorHandler.hh.
Referenced by handleEvent().