FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Xml::MarkupParser Class Referenceabstract

XML Markup Parser interface. More...

#include <xml_scanner.hpp>

Inheritance diagram for FEAT::Xml::MarkupParser:
FEAT::Geometry::Atlas::BezierChartParser< Mesh_, ChartReturn_ > FEAT::Geometry::Atlas::BezierParamsParser< Mesh_ > FEAT::Geometry::Atlas::BezierPointsParser< Mesh_ > FEAT::Geometry::Atlas::CircleChartParser< Mesh_, ChartReturn_ > FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, true > FEAT::Geometry::Atlas::SphereChartParser< Mesh_, ChartReturn_ > FEAT::Xml::DummyParser FEAT::Xml::DumpParser

Public Member Functions

virtual ~MarkupParser ()
 virtual destructor More...
 
virtual bool attribs (std::map< String, bool > &attrs) const =0
 Specifies the mandatory and optional attributes. More...
 
virtual void close (int iline, const String &sline)=0
 Closes this markup parser node. More...
 
virtual bool content (int iline, const String &sline)=0
 Called to process a content line. More...
 
virtual void create (int iline, const String &sline, const String &name, const std::map< String, String > &attrs, bool closed)=0
 Creates this markup parser node. More...
 
virtual std::shared_ptr< MarkupParsermarkup (int iline, const String &sline, const String &name)=0
 Called to process a child markup node. More...
 

Detailed Description

XML Markup Parser interface.

This class acts as an interface for all XML markup parsers.

Author
Peter Zajac

Definition at line 148 of file xml_scanner.hpp.

Constructor & Destructor Documentation

◆ ~MarkupParser()

virtual FEAT::Xml::MarkupParser::~MarkupParser ( )
inlinevirtual

virtual destructor

Definition at line 152 of file xml_scanner.hpp.

Member Function Documentation

◆ attribs()

virtual bool FEAT::Xml::MarkupParser::attribs ( std::map< String, bool > &  attrs) const
pure virtual

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.

Implemented in FEAT::Geometry::Atlas::BezierPointsParser< Mesh_ >, FEAT::Geometry::Atlas::BezierParamsParser< Mesh_ >, FEAT::Xml::DummyParser, FEAT::Xml::DumpParser, FEAT::Geometry::Atlas::BezierChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::CircleChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, true >, and FEAT::Geometry::Atlas::SphereChartParser< Mesh_, ChartReturn_ >.

◆ close()

virtual void FEAT::Xml::MarkupParser::close ( int  iline,
const String sline 
)
pure virtual

◆ content()

virtual bool FEAT::Xml::MarkupParser::content ( int  iline,
const String sline 
)
pure virtual

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.

Implemented in FEAT::Geometry::Atlas::BezierPointsParser< Mesh_ >, FEAT::Geometry::Atlas::BezierParamsParser< Mesh_ >, FEAT::Xml::DumpParser, FEAT::Geometry::Atlas::BezierChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::CircleChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, true >, FEAT::Geometry::Atlas::SphereChartParser< Mesh_, ChartReturn_ >, and FEAT::Xml::DummyParser.

◆ create()

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

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.

Implemented in FEAT::Xml::DumpParser, FEAT::Geometry::Atlas::BezierPointsParser< Mesh_ >, FEAT::Geometry::Atlas::BezierParamsParser< Mesh_ >, FEAT::Geometry::Atlas::BezierChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::CircleChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, true >, FEAT::Geometry::Atlas::SphereChartParser< Mesh_, ChartReturn_ >, and FEAT::Xml::DummyParser.

◆ markup()

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

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.

Implemented in FEAT::Geometry::Atlas::BezierPointsParser< Mesh_ >, FEAT::Geometry::Atlas::BezierParamsParser< Mesh_ >, FEAT::Geometry::Atlas::CircleChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::SphereChartParser< Mesh_, ChartReturn_ >, FEAT::Xml::DummyParser, FEAT::Geometry::Atlas::BezierChartParser< Mesh_, ChartReturn_ >, FEAT::Geometry::Atlas::ExtrudeChartParser< Mesh_, true >, and FEAT::Xml::DumpParser.


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