MolSim
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
XMLReader Class Reference

Class used to read and parse XML input data. More...

#include <XMLReader.h>

Inheritance diagram for XMLReader:
FileReader

Public Member Functions

 XMLReader (const std::string &filename)
 Construct a new XMLReader object.
 
void readXML (Arguments &args, ParticleContainer &pc, Thermostat &t, FlowSimulationAnalyzer &fsa)
 Read and parse the contents of a valid XML file into the given Arguments and ParticleContainer references.
 
- Public Member Functions inherited from FileReader
 FileReader ()
 Creates a new FileReader with no file initialized.
 
 FileReader (const std::string &filename)
 Creates a new FileReader and opens the file with the given name.
 
virtual ~FileReader ()
 Destroys the FileReader object and automatically closes the input stream.
 
void openFile (const std::string &filename)
 Initializes the input stream with the given file (via its name).
 

Private Attributes

std::string m_filename
 The name of the XML input file. Must be a valid XML file.
 

Additional Inherited Members

- Protected Attributes inherited from FileReader
std::ifstream m_infile
 Input stream representing the file containing molecule data.
 

Detailed Description

Class used to read and parse XML input data.

Constructor & Destructor Documentation

◆ XMLReader()

XMLReader::XMLReader ( const std::string &  filename)
explicit

Construct a new XMLReader object.

Parameters
filenameThe name of the XML input file. Must be a valid XML file.

Member Function Documentation

◆ readXML()

void XMLReader::readXML ( Arguments args,
ParticleContainer pc,
Thermostat t,
FlowSimulationAnalyzer fsa 
)

Read and parse the contents of a valid XML file into the given Arguments and ParticleContainer references.

On error, the program will terminate.

Parameters
argsA reference to the Arguments struct which will be modified.
pcA reference to the ParticleContainer object which will be modified.
tA reference to the Thermostat to be initialized.
fsaA reference to the FlowSimulationAnalyzer to be initialized.

Member Data Documentation

◆ m_filename

std::string XMLReader::m_filename
private

The name of the XML input file. Must be a valid XML file.


The documentation for this class was generated from the following file: