PARTONS/ElementaryUtils  
Basic utility softwares (Logger, threads, etc)
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ElemUtils::XMLParser Class Referenceabstract

FIFO. More...

Public Member Functions

 XMLParser ()
 
virtual ~XMLParser ()
 
void analyse (const std::string &file)
 
void loop (const std::string &file, size_t startIndex=0)
 
virtual void startElement (const std::string &elementName, Parameters attributes, const std::string &elementData)=0
 
virtual void emptyStartElement (const std::string &elementName, Parameters attributes)=0
 
virtual void endElement (const std::string &elementName)=0
 

Private Member Functions

size_t findIndexOf (const std::string &string, size_t startIndex)
 
void parseElement (const std::string &file, const size_t &xmlStartTagIndex, const size_t &xmlEndTagIndex)
 
void parseNode (size_t startIndex)
 
void parseAttributesFromXMLElement (const std::string &file, Parameters &attributes, const size_t attributesStartIndex, const size_t xmlEndTagIndex)
 

Private Attributes

size_t m_fileSize
 

Static Private Attributes

static const char TAB_CHARACTER = '\t'
 
static const char XML_VERSION_CHARACTER_IDENTIFIER = '?'
 
static const char XML_COMMENT_CHARACTER_IDENTIFIER = '!'
 
static const char XML_END_TAG_CHARACTER_IDENTIFIER = '/'
 
static const std::string ATTRIBUTE_KEY_VALUE_SEPARATOR_CHARACTER = "="
 
static const std::string XML_END_TAG_VERSION_IDENTIFIER = "?>"
 
static const std::string XML_END_TAG_COMMENT_IDENTIFIER = "-->"
 
static const std::string XML_TAG_NAME_ALLOWED_CHARACTERS
 
static const std::string XML_START_ELEMENT_TAG_NAME = "<"
 
static const std::string XML_END_ELEMENT_TAG_NAME = ">"
 

Detailed Description

FIFO.

Constructor & Destructor Documentation

◆ XMLParser()

ElemUtils::XMLParser::XMLParser ( )

◆ ~XMLParser()

ElemUtils::XMLParser::~XMLParser ( )
virtual

Member Function Documentation

◆ analyse()

void ElemUtils::XMLParser::analyse ( const std::string &  file)
Parameters
filecontent of the file as a string

◆ emptyStartElement()

virtual void ElemUtils::XMLParser::emptyStartElement ( const std::string &  elementName,
Parameters  attributes 
)
pure virtual

◆ endElement()

virtual void ElemUtils::XMLParser::endElement ( const std::string &  elementName)
pure virtual

◆ findIndexOf()

size_t ElemUtils::XMLParser::findIndexOf ( const std::string &  string,
size_t  startIndex 
)
private

◆ loop()

void ElemUtils::XMLParser::loop ( const std::string &  file,
size_t  startIndex = 0 
)

◆ parseAttributesFromXMLElement()

void ElemUtils::XMLParser::parseAttributesFromXMLElement ( const std::string &  file,
Parameters attributes,
const size_t  attributesStartIndex,
const size_t  xmlEndTagIndex 
)
private

◆ parseElement()

void ElemUtils::XMLParser::parseElement ( const std::string &  file,
const size_t &  xmlStartTagIndex,
const size_t &  xmlEndTagIndex 
)
private

◆ parseNode()

void ElemUtils::XMLParser::parseNode ( size_t  startIndex)
private

◆ startElement()

virtual void ElemUtils::XMLParser::startElement ( const std::string &  elementName,
Parameters  attributes,
const std::string &  elementData 
)
pure virtual

Member Data Documentation

◆ ATTRIBUTE_KEY_VALUE_SEPARATOR_CHARACTER

const std::string ElemUtils::XMLParser::ATTRIBUTE_KEY_VALUE_SEPARATOR_CHARACTER = "="
staticprivate

◆ m_fileSize

size_t ElemUtils::XMLParser::m_fileSize
private

◆ TAB_CHARACTER

const char ElemUtils::XMLParser::TAB_CHARACTER = '\t'
staticprivate

◆ XML_COMMENT_CHARACTER_IDENTIFIER

const char ElemUtils::XMLParser::XML_COMMENT_CHARACTER_IDENTIFIER = '!'
staticprivate

◆ XML_END_ELEMENT_TAG_NAME

const std::string ElemUtils::XMLParser::XML_END_ELEMENT_TAG_NAME = ">"
staticprivate

◆ XML_END_TAG_CHARACTER_IDENTIFIER

const char ElemUtils::XMLParser::XML_END_TAG_CHARACTER_IDENTIFIER = '/'
staticprivate

◆ XML_END_TAG_COMMENT_IDENTIFIER

const std::string ElemUtils::XMLParser::XML_END_TAG_COMMENT_IDENTIFIER = "-->"
staticprivate

◆ XML_END_TAG_VERSION_IDENTIFIER

const std::string ElemUtils::XMLParser::XML_END_TAG_VERSION_IDENTIFIER = "?>"
staticprivate

◆ XML_START_ELEMENT_TAG_NAME

const std::string ElemUtils::XMLParser::XML_START_ELEMENT_TAG_NAME = "<"
staticprivate

◆ XML_TAG_NAME_ALLOWED_CHARACTERS

const std::string ElemUtils::XMLParser::XML_TAG_NAME_ALLOWED_CHARACTERS
staticprivate
Initial value:
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"

◆ XML_VERSION_CHARACTER_IDENTIFIER

const char ElemUtils::XMLParser::XML_VERSION_CHARACTER_IDENTIFIER = '?'
staticprivate

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