#include <ElementParser.h>
|
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 ...
|
|
ElementParser::ElementParser |
( |
QSharedPointer< QXmlStreamReader > |
pXmlReader | ) |
|
ElementParser::~ElementParser |
( |
| ) |
|
|
virtual |
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
-
pValue | the elements value to check. |
pElementName | the 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
-
pList | the list to check. |
pElementName | the 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
-
pNotYetSeen | Indicates whether the element has not yet been seen. |
- Rückgabe
true
, if the assertion holds, false
otherwise.
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.
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.
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
-
pText | The 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.
bool governikus::ElementParser::mParseError |
|
protected |
QSharedPointer<QXmlStreamReader> governikus::ElementParser::mXmlReader |
|
protected |
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: