maliput_malidrive
NodeParser Class Reference

Detailed Description

Parses XML nodes.

There are specializations for:

#include <src/maliput_malidrive/xodr/parser.h>

Inheritance diagram for NodeParser:
[legend]

Public Member Functions

 MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (NodeParser)
 
 NodeParser ()=delete
 
 ~NodeParser ()=default
 
 NodeParser (tinyxml2::XMLElement *element, const ParserConfiguration &parser_configuration)
 Creates a NodeParser from a tinyxml2::XMLElement. More...
 
template<typename T >
As () const
 Parses the node as T. More...
 
template<>
Header As () const
 
- Public Member Functions inherited from ParserBase
 MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (ParserBase)
 
 ParserBase ()=delete
 
virtual ~ParserBase ()=default
 
 ParserBase (tinyxml2::XMLElement *element, const ParserConfiguration &parser_configuration)
 Creates an ParserBase from a tinyxml2::XMLElement. More...
 
int NumberOfAttributes () const
 Count the number of attributes the tinyxml2::XMLElement has. More...
 
std::string GetName () const
 

Additional Inherited Members

- Protected Attributes inherited from ParserBase
tinyxml2::XMLElement * element_ {}
 A XML node. More...
 
ParserConfiguration parser_configuration_ {}
 Parser configuration. More...
 

Constructor & Destructor Documentation

◆ NodeParser() [1/2]

NodeParser ( )
delete

◆ ~NodeParser()

~NodeParser ( )
default

◆ NodeParser() [2/2]

NodeParser ( tinyxml2::XMLElement *  element,
const ParserConfiguration parser_configuration 
)

Creates a NodeParser from a tinyxml2::XMLElement.

Parameters
elementIs the XML Node to be parsed.
parser_configurationHolds the configuration for the parser.
Exceptions
maliput::common::assertion_errorWhen element is nullptr.

Member Function Documentation

◆ As() [1/2]

T As ( ) const

Parses the node as T.

Template Parameters
TIs the type of the node's value.
Returns
A T(value).
Exceptions
maliput::common::assertion_errorWhen the node couldn't be parsed as T.

◆ As() [2/2]

Junction As ( ) const

◆ MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN ( NodeParser  )

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