FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Xml::DummyParser Class Reference

Dummy XML markup parser class. More...

#include <xml_scanner.hpp>

Inheritance diagram for FEAT::Xml::DummyParser:
FEAT::Xml::MarkupParser FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, enable_ >

Public Member Functions

virtual bool attribs (std::map< String, bool > &) const override
 Specifies the mandatory and optional attributes. More...
 
virtual void close (int, const String &) override
 Closes this markup parser node. More...
 
virtual bool content (int, const String &) override
 Called to process a content line. More...
 
virtual void create (int, const String &, const String &, const std::map< String, String > &, bool) override
 Creates this markup parser node. More...
 
virtual std::shared_ptr< MarkupParsermarkup (int, const String &, const String &) override
 Called to process a child markup node. More...
 

Detailed Description

Dummy XML markup parser class.

This class implements the MarkupParser interface an implements a "dummy" parser which accepts all kinds of markups and content, but does not do anything with it - think of it as /dev/null

This class may be somewhat useful for development purposes.

Author
Peter Zajac

Definition at line 258 of file xml_scanner.hpp.

Constructor & Destructor Documentation

◆ DummyParser()

FEAT::Xml::DummyParser::DummyParser ( )
explicit

Definition at line 14 of file xml_scanner.cpp.

Member Function Documentation

◆ attribs()

bool FEAT::Xml::DummyParser::attribs ( std::map< String, bool > &  attrs) const
overridevirtual

Specifies the mandatory and optional attributes.

Parameters
[out]attrsA transient reference to a map of all supported attribute key names. The second component specifies whether the attribute is mandatory (true) or optional (false).
Returns
true, if the scanner should check for valid arguments, otherwise false.

Implements FEAT::Xml::MarkupParser.

Definition at line 18 of file xml_scanner.cpp.

◆ close()

void FEAT::Xml::DummyParser::close ( int  iline,
const String sline 
)
overridevirtual

Closes this markup parser node.

Parameters
[in]ilineThe line number of the markup terminator in the XML file.
[in]slineThe line string of the markup in the XML file.

Implements FEAT::Xml::MarkupParser.

Definition at line 27 of file xml_scanner.cpp.

◆ content()

bool FEAT::Xml::DummyParser::content ( int  iline,
const String sline 
)
overridevirtual

Called to process a content line.

This function is called by the XML scanner when a content line inside this markup parser node is detected.

Parameters
[in]ilineThe line number of the content line in the XML file.
[in]slineThe line string of the content line in the XML file.
Returns
true, if the content line was parsed successfully, otherwise false.
Note
Returning false will cause the scanner to throw a Xml::GammarError.

Implements FEAT::Xml::MarkupParser.

Definition at line 37 of file xml_scanner.cpp.

◆ create()

void FEAT::Xml::DummyParser::create ( int  iline,
const String sline,
const String name,
const std::map< String, String > &  attrs,
bool  closed 
)
overridevirtual

Creates this markup parser node.

Parameters
[in]ilineThe line number of the markup in the XML file.
[in]slineThe line string of the markup in the XML file.
[in]nameThe name of the markup.
[in]attrsA transient reference to a map of all attributes of the markup.
[in]closedSpecifies whether the markup is closed.

Implements FEAT::Xml::MarkupParser.

Definition at line 23 of file xml_scanner.cpp.

◆ markup()

std::shared_ptr< MarkupParser > FEAT::Xml::DummyParser::markup ( int  iline,
const String sline,
const String name 
)
overridevirtual

Called to process a child markup node.

This function is called by the XML scanner when a child markup inside this markup parser node is detected.

Parameters
[in]ilineThe line number of the child markup in the XML file.
[in]slineThe line string of the child markup in the XML file.
[in]nameThe markup name of the child markup.
Returns
A new MarkupParser object if the markup is a valid child or nullptr if a child markup with this name is not supported.
Note
Returning nullptr will cause the scanner to throw a Xml::GammarError.

Implements FEAT::Xml::MarkupParser.

Definition at line 31 of file xml_scanner.cpp.


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