MolSim
Loading...
Searching...
No Matches
XMLWriter.h
Go to the documentation of this file.
1
10#pragma once
11
14#include "objects/Thermostat.h"
15#include "utils/Arguments.h"
16#include <fstream>
17#include <string>
18
20class XMLWriter {
21 private:
23 std::ofstream m_file;
25 std::string m_filename;
26
32 void openFile(const std::string &filename);
33
35 void closeFile();
36
37 public:
43 explicit XMLWriter(const std::string &filename);
44
47
56 void serialize(const ParticleContainer &pc, const Arguments &args, const Thermostat &t,
57 const FlowSimulationAnalyzer &fsa);
58};
Configurable program and simulation arguments.
Component for analyzing particle density and velocity profiles.
Class for encapsulating and iterating over multiple Particle objects.
Model of a thermostat.
Class modeling and analyzer that computes statistics about the state of a nano-scale flow simulation.
Definition FlowSimulationAnalyzer.h:16
Class for encapsulating multiple Particle objects..
Definition ParticleContainer.h:17
Class modeling a thermostat which regulates the temperature of a Particle system.
Definition Thermostat.h:14
Class used to serialize simulation results to an XML file which can once again be used as input.
Definition XMLWriter.h:20
void closeFile()
Closes the opened file.
void openFile(const std::string &filename)
Opens a new file for writing.
void serialize(const ParticleContainer &pc, const Arguments &args, const Thermostat &t, const FlowSimulationAnalyzer &fsa)
Serializes simulation data to an XML file.
XMLWriter(const std::string &filename)
Constructs a new XMLWriter object.
std::ofstream m_file
Output stream containing the XML file to write contents to.
Definition XMLWriter.h:23
~XMLWriter()
Destroys the current XMLWriter object.
std::string m_filename
The name of the output file.
Definition XMLWriter.h:25
Struct containing each option configurable via command line arguments.
Definition Arguments.h:31