|
MolSim
|
Class used to serialize simulation results to an XML file which can once again be used as input. More...
#include <XMLWriter.h>
Public Member Functions | |
| XMLWriter (const std::string &filename) | |
| Constructs a new XMLWriter object. | |
| ~XMLWriter () | |
| Destroys the current XMLWriter object. | |
| void | serialize (const ParticleContainer &pc, const Arguments &args, const Thermostat &t, const FlowSimulationAnalyzer &fsa) |
| Serializes simulation data to an XML file. | |
Private Member Functions | |
| void | openFile (const std::string &filename) |
| Opens a new file for writing. | |
| void | closeFile () |
| Closes the opened file. | |
Private Attributes | |
| std::ofstream | m_file |
| Output stream containing the XML file to write contents to. | |
| std::string | m_filename |
| The name of the output file. | |
Class used to serialize simulation results to an XML file which can once again be used as input.
|
explicit |
Constructs a new XMLWriter object.
| filename | The name of the file to be written to. |
| XMLWriter::~XMLWriter | ( | ) |
Destroys the current XMLWriter object.
|
private |
Closes the opened file.
|
private |
Opens a new file for writing.
| filename | The name of the file to be written to. |
| void XMLWriter::serialize | ( | const ParticleContainer & | pc, |
| const Arguments & | args, | ||
| const Thermostat & | t, | ||
| const FlowSimulationAnalyzer & | fsa | ||
| ) |
Serializes simulation data to an XML file.
| pc | The ParticleContainer containing the active simulation particles. |
| args | The Arguments struct containing simulation metadata. |
| t | The thermostat. |
| fsa | The analyzer, which may be on or off. If disabled, it will not be serialized. |
|
private |
Output stream containing the XML file to write contents to.
|
private |
The name of the output file.