|
preCICE v3.3.0
|
#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 (std::string_view filePath, const ConfigurationContext &context, std::shared_ptr< XMLTag > pXmlTag) | |
| Parser ctor for Callback init. | |
| ConfigParser (std::string_view filePath) | |
| Parser ctor without Callbacks. | |
| int | readXmlFile (std::string const &filePath) |
| Reads the xml file. | |
| std::string | hash () const |
| returns the hash of the processed 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_view localname, std::string_view 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, std::string_view mess) |
| Proxy for error and warning messages from libxml2. | |
Private Attributes | |
| std::string | _hash |
| the hash of the last processed config | |
| 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 | ( | std::string_view | filePath, |
| const ConfigurationContext & | context, | ||
| std::shared_ptr< XMLTag > | pXmlTag ) |
Parser ctor for Callback init.
Definition at line 123 of file ConfigParser.cpp.
| precice::xml::ConfigParser::ConfigParser | ( | std::string_view | filePath | ) |
Parser ctor without Callbacks.
Definition at line 143 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 225 of file ConfigParser.cpp.
| std::string precice::xml::ConfigParser::hash | ( | ) | const |
returns the hash of the processed XML file
Definition at line 163 of file ConfigParser.cpp.
|
static |
Proxy for error and warning messages from libxml2.
Definition at line 148 of file ConfigParser.cpp.
| void precice::xml::ConfigParser::OnEndElement | ( | ) |
Callback for End-Tag.
Definition at line 297 of file ConfigParser.cpp.
| void precice::xml::ConfigParser::OnStartElement | ( | std::string_view | localname, |
| std::string_view | prefix, | ||
| CTag::AttributePair | attributes ) |
Callback for Start-Tag.
Definition at line 277 of file ConfigParser.cpp.
| void precice::xml::ConfigParser::OnTextSection | ( | const std::string & | ch | ) |
Callback for text sections in xml file.
Definition at line 302 of file ConfigParser.cpp.
| int precice::xml::ConfigParser::readXmlFile | ( | std::string const & | filePath | ) |
Reads the xml file.
Definition at line 168 of file ConfigParser.cpp.
|
private |
the hash of the last processed config
Definition at line 41 of file ConfigParser.hpp.
|
staticprivate |
Definition at line 38 of file ConfigParser.hpp.
|
private |
Definition at line 43 of file ConfigParser.hpp.
|
private |
Definition at line 44 of file ConfigParser.hpp.
|
private |
Definition at line 46 of file ConfigParser.hpp.