AusweisApp
Lade ...
Suche ...
Keine Treffer
governikus::ElementParser Klassenreferenz

#include <ElementParser.h>

Klassendiagramm für governikus::ElementParser:

Öffentliche Methoden

 ElementParser (QSharedPointer< QXmlStreamReader > pXmlReader)
 
virtual ~ElementParser ()
 
bool parserFailed () const
 

Geschützte Methoden

ConnectionHandle parseConnectionHandle ()
 
bool readNextStartElement ()
 Like QXmlStreamReader::readNextStartElement(), but also checks mParseError.
 
QString readElementText ()
 Returns the text (simplified()) between the current start element and the corresponding end element.
 
void assertMandatoryElement (const QString &pValue, const char *const pElementName)
 Issues a log warning and sets the error when the element has not been set, i.e.
 
template<typename T >
bool assertMandatoryList (const QList< T > &pList, const char *const pElementName)
 Issues a log warning and sets the error when the list is empty.
 
bool assertNoDuplicateElement (bool pNotYetSeen)
 Issues a log warning and sets the error when a duplicate element has been encountered.
 
bool readUniqueElementText (QString &pText)
 Returns the text (simplified()) between the current start element and the corresponding end element, if the element has not been encountered yet.
 
void skipCurrentElement () const
 Skips parsing of the current element Used to ignore unknown or unrecognized elements while parsing.
 
QStringView getElementName () const
 Returns the name of the current element and issues a log message with it.
 
void setParserFailed ()
 
void initData (const QByteArray &pXmlData)
 
QStringView getElementTypeByNamespace (const QString &pNamespace) const
 

Freundbeziehungen

class ::test_ElementParser
 

Beschreibung der Konstruktoren und Destruktoren

◆ ElementParser()

ElementParser::ElementParser ( QSharedPointer< QXmlStreamReader > pXmlReader)
explicit

◆ ~ElementParser()

ElementParser::~ElementParser ( )
virtualdefault

Dokumentation der Elementfunktionen

◆ assertMandatoryElement()

void ElementParser::assertMandatoryElement ( const QString & pValue,
const char *const pElementName )
protected

Issues a log warning and sets the error when the element has not been set, i.e.

the element is null.

Parameter
pValuethe elements value to check.
pElementNamethe elements name used to generate the log message.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ assertMandatoryList()

template<typename T >
bool governikus::ElementParser::assertMandatoryList ( const QList< T > & pList,
const char *const pElementName )
protected

Issues a log warning and sets the error when the list is empty.

Parameter
pListthe list to check.
pElementNamethe elements name used to generate the log message.
Rückgabe
true, if the assertion holds, false otherwise.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ assertNoDuplicateElement()

bool ElementParser::assertNoDuplicateElement ( bool pNotYetSeen)
protected

Issues a log warning and sets the error when a duplicate element has been encountered.

Parameter
pNotYetSeenIndicates whether the element has not yet been seen.
Rückgabe
true, if the assertion holds, false otherwise.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ getElementName()

QStringView ElementParser::getElementName ( ) const
protected

Returns the name of the current element and issues a log message with it.

Rückgabe
the name of the currently parsed element, e.g. "data" in "<data>...</data>"
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ getElementTypeByNamespace()

QStringView ElementParser::getElementTypeByNamespace ( const QString & pNamespace) const
protected
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ initData()

void ElementParser::initData ( const QByteArray & pXmlData)
protected
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ parseConnectionHandle()

ConnectionHandle ElementParser::parseConnectionHandle ( )
protected
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ parserFailed()

bool ElementParser::parserFailed ( ) const
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ readElementText()

QString ElementParser::readElementText ( )
protected

Returns the text (simplified()) between the current start element and the corresponding end element.

Rückgabe
The element text on success (may be isEmpty(), but not isNull()), QString() on error.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ readNextStartElement()

bool ElementParser::readNextStartElement ( )
protected

Like QXmlStreamReader::readNextStartElement(), but also checks mParseError.

Rückgabe
true, if a next start element was found, false, if the end element was reached or an error occurred.
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ readUniqueElementText()

bool ElementParser::readUniqueElementText ( QString & pText)
protected

Returns the text (simplified()) between the current start element and the corresponding end element, if the element has not been encountered yet.

Parameter
pTextThe variable that is set to the read text. It is also used as an indicator whether the element has not yet been encountered (isNull()).
Rückgabe
true, if the element has not yet been encountered and the element text could be read, false otherwise.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ setParserFailed()

void ElementParser::setParserFailed ( )
protected

◆ skipCurrentElement()

void ElementParser::skipCurrentElement ( ) const
protected

Skips parsing of the current element Used to ignore unknown or unrecognized elements while parsing.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Freundbeziehungen und Funktionsdokumentation

◆ ::test_ElementParser

friend class ::test_ElementParser
friend

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: