preCICE v3.1.2
|
#include <ConfigParser.hpp>
Classes | |
struct | CTag |
Struct holding the read tag from xml file. More... | |
Public Types | |
using | CTagPtrVec = std::vector<std::shared_ptr<CTag>> |
Public Member Functions | |
ConfigParser (const std::string &filePath, const ConfigurationContext &context, std::shared_ptr< XMLTag > pXmlTag) | |
Parser ctor for Callback init. | |
ConfigParser (const std::string &filePath) | |
Parser ctor without Callbacks. | |
int | readXmlFile (std::string const &filePath) |
Reads the xml file. | |
void | connectTags (const ConfigurationContext &context, std::vector< std::shared_ptr< precice::xml::XMLTag > > &DefTags, CTagPtrVec &SubTags) |
Connects the actual tags of an xml layer with the predefined tags. | |
void | OnStartElement (std::string localname, std::string prefix, CTag::AttributePair attributes) |
Callback for Start-Tag. | |
void | OnEndElement () |
Callback for End-Tag. | |
void | OnTextSection (const std::string &ch) |
Callback for text sections in xml file. | |
Static Public Member Functions | |
static void | MessageProxy (int level, const std::string &mess) |
Proxy for error and warning messages from libxml2. | |
Private Attributes | |
CTagPtrVec | m_AllTags |
CTagPtrVec | m_CurrentTags |
std::shared_ptr< precice::xml::XMLTag > | m_pXmlTag |
Static Private Attributes | |
static precice::logging::Logger | _log |
Definition at line 22 of file ConfigParser.hpp.
Definition at line 35 of file ConfigParser.hpp.
precice::xml::ConfigParser::ConfigParser | ( | const std::string & | filePath, |
const ConfigurationContext & | context, | ||
std::shared_ptr< XMLTag > | pXmlTag ) |
Parser ctor for Callback init.
Definition at line 120 of file ConfigParser.cpp.
precice::xml::ConfigParser::ConfigParser | ( | const std::string & | filePath | ) |
Parser ctor without Callbacks.
Definition at line 138 of file ConfigParser.cpp.
void precice::xml::ConfigParser::connectTags | ( | const ConfigurationContext & | context, |
std::vector< std::shared_ptr< precice::xml::XMLTag > > & | DefTags, | ||
CTagPtrVec & | SubTags ) |
Connects the actual tags of an xml layer with the predefined tags.
DefTags | predefined tags |
SubTags | actual tags from xml file |
Definition at line 211 of file ConfigParser.cpp.
|
static |
Proxy for error and warning messages from libxml2.
Definition at line 143 of file ConfigParser.cpp.
void precice::xml::ConfigParser::OnEndElement | ( | ) |
Callback for End-Tag.
Definition at line 280 of file ConfigParser.cpp.
void precice::xml::ConfigParser::OnStartElement | ( | std::string | localname, |
std::string | prefix, | ||
CTag::AttributePair | attributes ) |
Callback for Start-Tag.
Definition at line 260 of file ConfigParser.cpp.
void precice::xml::ConfigParser::OnTextSection | ( | const std::string & | ch | ) |
Callback for text sections in xml file.
Definition at line 285 of file ConfigParser.cpp.
int precice::xml::ConfigParser::readXmlFile | ( | std::string const & | filePath | ) |
Reads the xml file.
Definition at line 158 of file ConfigParser.cpp.
|
staticprivate |
Definition at line 38 of file ConfigParser.hpp.
|
private |
Definition at line 40 of file ConfigParser.hpp.
|
private |
Definition at line 41 of file ConfigParser.hpp.
|
private |
Definition at line 43 of file ConfigParser.hpp.