14#include <QtXml/QDomNode>
39 int readFile(
const QString& fileName)
override;
44 return readFile(QString(fname.c_str())) != 0;
51 bool write()
override;
55 QDomNode
findParam(QDomNode
const& param_root,
56 QString
const& param_name)
const;
59 void readConditions(QDomNode
const& pvar_root, QDomNode
const& param_root);
63 QDomNode
const& param_root,
67 void readSourceTerms(QDomNode
const& st_root, QDomNode
const& param_root,
83 std::string
const& name)
const;
87 std::string
const& name)
const;
91 T*
parseCondition(QDomNode
const& node, QDomNode
const& param_root,
Definition of the Writer class.
Base class which enables writing an object to string, stringstream or file.
Base class for boundary conditions, initial conditions and source terms.
void readBoundaryConditions(QDomNode const &bc_root, QDomNode const ¶m_root, DataHolderLib::ProcessVariable const &pvar)
Reading all boundary conditions.
T * parseCondition(QDomNode const &node, QDomNode const ¶m_root, DataHolderLib::ProcessVariable const &pvar) const
Parsing one specific condition.
int writeToFile(const std::string &filename)
Writes a project to the specified file.
std::vector< DataHolderLib::ProcessVariable > getPrimaryVariableVec() const
Compiles a vector of all existing primary variables for writing purposes.
bool write() override
Writes the object to the internal stream. This method must be implemented by a subclass....
void writeSourceTerms(QDomDocument &doc, QDomElement &st_list_tag, std::string const &name) const
Writes a list of source terms.
void readSourceTerms(QDomNode const &st_root, QDomNode const ¶m_root, DataHolderLib::ProcessVariable const &pvar)
Reading all source terms.
int readFile(const QString &fileName) override
Reads an xml-file containing a project.
void writeProcessVariables(QDomDocument &doc, QDomElement &root) const
Writes information on process variables.
~XmlPrjInterface() override=default
DataHolderLib::Project & _project
void writeCondition(QDomDocument &doc, QDomElement &tag, DataHolderLib::FemCondition const &cond) const
Writes one specific condition.
void writeBoundaryConditions(QDomDocument &doc, QDomElement &bc_list_tag, std::string const &name) const
Writes a list of boundary conditions.
XmlPrjInterface(DataHolderLib::Project &project)
void readConditions(QDomNode const &pvar_root, QDomNode const ¶m_root)
Manages reading all kinds of conditions.
QDomNode findParam(QDomNode const ¶m_root, QString const ¶m_name) const
Tests if a given parameter exists within the file.
bool readFile(std::string const &fname)
Reads an xml-file containing a project.