#include <ElementParser.h>
◆ ElementParser()
◆ ~ElementParser()
ElementParser::~ElementParser |
( |
| ) |
|
|
virtualdefault |
◆ assertMandatoryElement()
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. |
◆ assertMandatoryList()
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.
◆ assertNoDuplicateElement()
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.
◆ getElementName()
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>"
◆ getElementTypeByNamespace()
QStringView ElementParser::getElementTypeByNamespace |
( |
const QString & | pNamespace | ) |
const |
|
protected |
◆ initData()
◆ parseConnectionHandle()
◆ parserFailed()
bool ElementParser::parserFailed |
( |
| ) |
const |
◆ 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.
◆ 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.
◆ 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
-
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.
◆ 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.
◆ ::test_ElementParser
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: