AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
governikus::ElementParser Klassenreferenz

#include <ElementParser.h>

Klassendiagramm für governikus::ElementParser:

Öffentliche Methoden

 ElementParser (QSharedPointer< QXmlStreamReader > pXmlReader)
 
virtual ~ElementParser ()
 

Geschützte Methoden

bool readNextStartElement ()
 Like QXmlStreamReader::readNextStartElement(), but also checks mParseError. Mehr ...
 
QString readElementText ()
 Returns the text (simplified()) between the current start element and the corresponding end element. Mehr ...
 
void assertMandatoryElement (const QString &pValue, const char *pElementName)
 Issues a log warning and sets the error when the element has not been set, i.e. Mehr ...
 
template<typename T >
bool assertMandatoryList (const QVector< T > &pList, const char *pElementName)
 Issues a log warning and sets the error when the list is empty. Mehr ...
 
bool assertNoDuplicateElement (bool pNotYetSeen)
 Issues a log warning and sets the error when a duplicate element has been encountered. Mehr ...
 
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. Mehr ...
 

Geschützte Attribute

QSharedPointer< QXmlStreamReader > mXmlReader
 
bool mParseError
 

Beschreibung der Konstruktoren und Destruktoren

ElementParser::ElementParser ( QSharedPointer< QXmlStreamReader >  pXmlReader)
ElementParser::~ElementParser ( )
virtual

Dokumentation der Elementfunktionen

void ElementParser::assertMandatoryElement ( const QString &  pValue,
const char 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.
template<typename T >
bool governikus::ElementParser::assertMandatoryList ( const QVector< T > &  pList,
const char 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.
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, wo diese Funktion aufgerufen wird:

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, wo diese Funktion aufgerufen wird:

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:

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:

Dokumentation der Datenelemente

bool governikus::ElementParser::mParseError
protected
QSharedPointer<QXmlStreamReader> governikus::ElementParser::mXmlReader
protected

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