Molecular Dynamics Simulation
1.0
src
io
output
FileWriter.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
#include <optional>
5
6
#include "
particles/Particle.h
"
7
#include "
simulation/SimulationParams.h
"
8
12
class
FileWriter
{
13
public
:
17
virtual
~FileWriter
() =
default
;
18
28
[[nodiscard]]
virtual
const
std::filesystem::path
writeFile
(
const
SimulationParams
& params,
size_t
iteration,
29
const
std::vector<Particle>& particles)
const
= 0;
30
};
Particle.h
SimulationParams.h
FileWriter
Abstract base class for all file writers.
Definition:
FileWriter.h:12
FileWriter::~FileWriter
virtual ~FileWriter()=default
virtual destructor for correct cleanup of derived classes
FileWriter::writeFile
virtual const std::filesystem::path writeFile(const SimulationParams ¶ms, size_t iteration, const std::vector< Particle > &particles) const =0
Writes the file to the given path, uses the given ParticleContainer and the current iteration.
SimulationParams
Contains all parameters needed to run a simulation.
Definition:
SimulationParams.h:22
Generated by
1.9.1