maliput_malidrive
ParserBase Class Reference

Detailed Description

Base class for parsing a tinyxml2::XMLElement node.

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

Inheritance diagram for ParserBase:
[legend]

Public Member Functions

 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
 

Protected Attributes

tinyxml2::XMLElement * element_ {}
 A XML node. More...
 
ParserConfiguration parser_configuration_ {}
 Parser configuration. More...
 

Constructor & Destructor Documentation

◆ ParserBase() [1/2]

ParserBase ( )
delete

◆ ~ParserBase()

virtual ~ParserBase ( )
virtualdefault

◆ ParserBase() [2/2]

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

Creates an ParserBase from a tinyxml2::XMLElement.

Parameters
elementIs the XML Node that contains attributes to be parsed.
parser_configurationHolds the configuration for the parser.
Exceptions
maliput::common::assertion_errorWhen element is nullptr.
maliput::common::assertion_errorWhen parser_configuration.tolerance is negative.

Member Function Documentation

◆ GetName()

std::string GetName ( ) const
Returns
The element's name.

◆ MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN ( ParserBase  )

◆ NumberOfAttributes()

int NumberOfAttributes ( ) const

Count the number of attributes the tinyxml2::XMLElement has.

Returns
The number of attributes.

Member Data Documentation

◆ element_

tinyxml2::XMLElement* element_ {}
protected

A XML node.

◆ parser_configuration_

ParserConfiguration parser_configuration_ {}
protected

Parser configuration.


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