Class to read particle and simulation data from a '.xml' file.
More...
#include <XMLFileReader.h>
Class to read particle and simulation data from a '.xml' file.
Definition at line 10 of file XMLFileReader.h.
◆ XMLFileReader()
XMLFileReader::XMLFileReader |
( |
bool |
fresh, |
|
|
bool |
allow_recursion = true |
|
) |
| |
|
inlineexplicit |
◆ readFile()
std::tuple< std::vector< Particle >, std::optional< SimulationParams > > XMLFileReader::readFile |
( |
const std::filesystem::path & |
filepath | ) |
const |
|
overridevirtual |
Reads particle data from a '.xml' file and returns a vector of particles Other simulation parameters are returned as an optional SimulationParams object.
- Parameters
-
filepath | Path to the file to read |
Implements FileReader.
Definition at line 304 of file XMLFileReader.cpp.
306 auto config = configuration(filepath);
309 }
catch (
const xml_schema::exception& e) {
310 std::stringstream error_message;
311 error_message <<
"Error: could not parse file '" << filepath <<
"'.\n";
312 error_message << e << std::endl;
313 throw FileFormatException(error_message.str());
std::tuple< std::vector< Particle >, SimulationParams > prepareParticles(std::filesystem::path curr_file_path, ConfigurationType &config, bool fresh, bool allow_recursion, std::filesystem::path output_base_path="", int depth=0)
◆ allow_recursion
bool XMLFileReader::allow_recursion |
|
private |
◆ fresh
bool XMLFileReader::fresh |
|
private |
The documentation for this class was generated from the following files: