#include <SIG_Recorder.h>
Inheritance diagram for SIGEL_Simulation::SIG_Recorder:
Public Methods | |
SIG_Recorder () | |
The SIG_Recorders constructor. More... | |
virtual void | init () throw (SIG_RecorderNoQueriesSetException, SIG_RecorderBadRecordingOrderException) |
This method does initialization-work that cannot be done at construction time (because simulationQueries is still 0). More... | |
virtual void | record () throw (SIG_RecorderNoQueriesSetException, SIG_RecorderBadRecordingOrderException) |
Will be called in each timeframe by the simulator. More... | |
virtual void | finish () throw (SIG_RecorderNoQueriesSetException, SIG_RecorderBadRecordingOrderException) |
Is called after all the data-recording is done (for example to do final preparations on the collected data). More... | |
void | setSimulationQueries (SIG_SimulationQueries const &newSimulationQueries) |
This sets the simulationQueries pointer. More... | |
Protected Attributes | |
SIG_SimulationQueries const* | simulationQueries |
The pointer to the SIG_SimulationQueries object. More... | |
Private Attributes | |
bool | initialized |
True if and only if the method init was already executed. More... | |
bool | finished |
True if and only if the method finish was already executed. More... |
It contains a pointer to a SIG_SimulationQueries object whose methods can be used to collect information about the simulation state in the current frame. During the simulation run the three methods init, record and finish of the recorder are called by the SIG_Simulation's main methods (makeTimeStep respectively start). Their equivalents in derived class should perform the data-recording. From SIG_Recorder e.g. a fitness-recorder (collecting data used by a fitness function) or a render-recorder (collecting all the data used to graphically render the simulated frame) can be derived.
Definition at line 27 of file SIG_Recorder.h.
|
The SIG_Recorders constructor. It has to be called by the constructors of derived classes. Definition at line 3 of file SIG_Recorder.cpp. |
|
Is called after all the data-recording is done (for example to do final preparations on the collected data).
Reimplemented in SIGEL_GP::SIG_GPSimpleRecorder, and SIGEL_Visualisation::SIG_RenderRecorder. Definition at line 32 of file SIG_Recorder.cpp. Referenced by SIGEL_Visualisation::SIG_RenderRecorder::finish(), and SIGEL_GP::SIG_GPSimpleRecorder::finish(). |
|
This method does initialization-work that cannot be done at construction time (because simulationQueries is still 0).
Reimplemented in SIGEL_GP::SIG_GPSimpleRecorder, and SIGEL_Visualisation::SIG_RenderRecorder. Definition at line 9 of file SIG_Recorder.cpp. Referenced by SIGEL_Visualisation::SIG_RenderRecorder::init(), and SIGEL_GP::SIG_GPSimpleRecorder::init(). |
|
Will be called in each timeframe by the simulator. Each time the record-method is called it takes the relevant information from the simulation's queries-interface and stored in an appropriate data structure.
Reimplemented in SIGEL_GP::SIG_GPSimpleRecorder, and SIGEL_Visualisation::SIG_RenderRecorder. Definition at line 20 of file SIG_Recorder.cpp. Referenced by SIGEL_Visualisation::SIG_RenderRecorder::record(). |
|
This sets the simulationQueries pointer.
Definition at line 45 of file SIG_Recorder.cpp. |
|
True if and only if the method finish was already executed.
Definition at line 140 of file SIG_Recorder.h. |
|
True if and only if the method init was already executed.
Definition at line 135 of file SIG_Recorder.h. |
|
The pointer to the SIG_SimulationQueries object. Its methods are the only way for the recorder to collect data about the simulation. Definition at line 129 of file SIG_Recorder.h. |