preCICE v3.2.0
Loading...
Searching...
No Matches
ConfigParser.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <string>
6#include <vector>
7#include "logging/Logger.hpp"
8#include "xml/XMLTag.hpp"
9
10namespace precice {
11namespace logging {
12class Logger;
13} // namespace logging
14
15namespace xml {
16class XMLTag; // forward declaration to resolve circular import
18
20std::string decodeXML(std::string_view xml);
21
83} // namespace xml
84} // namespace precice
This class provides a lightweight logger.
Definition Logger.hpp:17
void OnTextSection(const std::string &ch)
Callback for text sections in xml file.
std::vector< std::shared_ptr< CTag > > CTagPtrVec
void OnEndElement()
Callback for End-Tag.
std::shared_ptr< precice::xml::XMLTag > m_pXmlTag
ConfigParser(std::string_view filePath, const ConfigurationContext &context, std::shared_ptr< XMLTag > pXmlTag)
Parser ctor for Callback init.
void OnStartElement(std::string_view localname, std::string_view prefix, CTag::AttributePair attributes)
Callback for Start-Tag.
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.
std::string hash() const
returns the hash of the processed XML file
static void MessageProxy(int level, std::string_view mess)
Proxy for error and warning messages from libxml2.
int readXmlFile(std::string const &filePath)
Reads the xml file.
static precice::logging::Logger _log
std::string _hash
the hash of the last processed config
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:28
contains the logging framework.
contains the XML configuration parser.
std::string decodeXML(std::string_view xml)
Decodes escape sequences of a given xml.
Main namespace of the precice library.
Struct holding the read tag from xml file.
std::map< std::string, std::string > AttributePair
std::vector< std::shared_ptr< CTag > > m_aSubTags
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:21