44 #ifndef __SCB_WRITER_H__
45 #define __SCB_WRITER_H__
49 #include "mengeCommon.h"
136 class SCBFrameWriter;
137 class SimulatorInterface;
350 #endif // __SCB_WRITER_H__
~SCBWriter()
Destructor.
Definition: SCBWriter.cpp:67
Base exception class for scb writers.
Definition: SCBWriter.h:62
Writer for version 2.1.
Definition: SCBWriter.h:288
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
int _version[2]
The version of the scb file to be written. Version is represented by the integer _verstion[0]._version[1].
Definition: SCBWriter.h:182
SCBVersionException()
Default constructor.
Definition: SCBWriter.h:105
std::ofstream _file
The file object for the scb stream to be written to.
Definition: SCBWriter.h:192
Exception raised for file I/O errors.
Definition: SCBWriter.h:120
The definition of the behavior finite state machine.
void writeHeader2_0()
Writes the header appropriate to major version 2 formats.
Definition: SCBWriter.cpp:132
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:241
SCBFatalException(const std::string &s)
Constructor with message.
Definition: SCBWriter.h:92
SCBVersionException(const std::string &s)
Constructor with message.
Definition: SCBWriter.h:112
SCBFileException()
Default constructor.
Definition: SCBWriter.h:125
Writer for version 1.0.
Definition: SCBWriter.h:256
SCBException(const std::string &s)
Constructor with message.
Definition: SCBWriter.h:74
The basic simulator interface required by the fsm.
Definition: SimulatorInterface.h:66
Writer for version 2.0.
Definition: SCBWriter.h:271
SCBException()
Default constructor.
Definition: SCBWriter.h:67
Base exception class for menge operations.
Definition: MengeException.h:58
SCBWriter(const std::string &pathName, const std::string &version, SimulatorInterface *sim)
Constructor for SCBWriter.
Definition: SCBWriter.cpp:51
Exception raised for invalid scb version.
Definition: SCBWriter.h:100
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:227
SimulatorInterface * _sim
A pointer to the simulator to write to the file.
Definition: SCBWriter.h:187
Writer for version 2.4.
Definition: SCBWriter.h:343
void writeHeader1_0()
Writes the header appropriate to major version 1 formats.
Definition: SCBWriter.cpp:125
Templated class for the behavior finite state machine.
Definition: FSM.h:126
Base class for fatal exceptions.
Definition: MengeException.h:99
Class responsible for writing the agent state of the simulator and fsm into a file.
Definition: SCBWriter.h:145
Contains the BaseAgent class - the underlying class which defines the basic functionality for all sha...
SCBFileException(const std::string &s)
Constructor with message.
Definition: SCBWriter.h:132
The fatal scb writers exception.
Definition: SCBWriter.h:80
Writer for version 2.3.
Definition: SCBWriter.h:327
This base class for writing a single frame of simulation data to the scb file.
Definition: SCBWriter.h:228
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)=0
Function to write current frame's state to the file.
void writeFrame(BFSM::FSM *fsm)
Writes the current frame of the stored simulator to the file.
Definition: SCBWriter.cpp:108
Writer for version 2.2.
Definition: SCBWriter.h:309
The namespace that contains the basic simulation mechanisms.
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:155
static const int ZERO
Simple static variable for writing binary zeros to the file.
Definition: SCBWriter.h:233
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:185
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:202
SCBFatalException()
Default constructor.
Definition: SCBWriter.h:85
bool validateVersion(const std::string &version)
Confirms that the given version is valid. Function has side-effects. This must be called for the SCBW...
Definition: SCBWriter.cpp:74
virtual void writeFrame(std::ofstream &file, SimulatorInterface *sim, BFSM::FSM *fsm)
Function to write current frame's state to the file.
Definition: SCBWriter.cpp:170
SCBFrameWriter * _frameWriter
The frame writer – defines the format of the frame's data.
Definition: SCBWriter.h:176
void writeHeader()
Writes the appropriate header to the open file.
Definition: SCBWriter.cpp:114