preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
precice::xml::ConfigParser Class Reference

#include <ConfigParser.hpp>

Collaboration diagram for precice::xml::ConfigParser:
[legend]

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::XMLTagm_pXmlTag
 

Static Private Attributes

static precice::logging::Logger _log
 

Detailed Description

Definition at line 22 of file ConfigParser.hpp.

Member Typedef Documentation

◆ CTagPtrVec

Definition at line 35 of file ConfigParser.hpp.

Constructor & Destructor Documentation

◆ ConfigParser() [1/2]

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.

Here is the call graph for this function:

◆ ConfigParser() [2/2]

precice::xml::ConfigParser::ConfigParser ( const std::string & filePath)

Parser ctor without Callbacks.

Definition at line 138 of file ConfigParser.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ connectTags()

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.

Parameters
DefTagspredefined tags
SubTagsactual tags from xml file

Definition at line 211 of file ConfigParser.cpp.

Here is the call graph for this function:

◆ MessageProxy()

void precice::xml::ConfigParser::MessageProxy ( int level,
const std::string & mess )
static

Proxy for error and warning messages from libxml2.

Definition at line 143 of file ConfigParser.cpp.

◆ OnEndElement()

void precice::xml::ConfigParser::OnEndElement ( )

Callback for End-Tag.

Definition at line 280 of file ConfigParser.cpp.

Here is the call graph for this function:

◆ OnStartElement()

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.

Here is the call graph for this function:

◆ OnTextSection()

void precice::xml::ConfigParser::OnTextSection ( const std::string & ch)

Callback for text sections in xml file.

Definition at line 285 of file ConfigParser.cpp.

◆ readXmlFile()

int precice::xml::ConfigParser::readXmlFile ( std::string const & filePath)

Reads the xml file.

Definition at line 158 of file ConfigParser.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _log

precice::logging::Logger precice::xml::ConfigParser::_log
staticprivate

Definition at line 38 of file ConfigParser.hpp.

◆ m_AllTags

CTagPtrVec precice::xml::ConfigParser::m_AllTags
private

Definition at line 40 of file ConfigParser.hpp.

◆ m_CurrentTags

CTagPtrVec precice::xml::ConfigParser::m_CurrentTags
private

Definition at line 41 of file ConfigParser.hpp.

◆ m_pXmlTag

std::shared_ptr<precice::xml::XMLTag> precice::xml::ConfigParser::m_pXmlTag
private

Definition at line 43 of file ConfigParser.hpp.


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