10#include <QLoggingCategory>
11#include <QSharedPointer>
12#include <QXmlStreamReader>
15class test_ElementParser;
23 friend class ::test_ElementParser;
26 explicit ElementParser(QSharedPointer<QXmlStreamReader> pXmlReader);
60 template<
typename T>
bool assertMandatoryList(
const QList<T>& pList,
const char*
const pElementName);
95 void initData(
const QByteArray& pXmlData);
102 QSharedPointer<QXmlStreamReader> mXmlReader;
Definition ConnectionHandle.h:13
bool assertMandatoryList(const QList< T > &pList, const char *const pElementName)
Issues a log warning and sets the error when the list is empty.
Definition ElementParser.h:107
ConnectionHandle parseConnectionHandle()
Definition ElementParser.cpp:128
QStringView getElementTypeByNamespace(const QString &pNamespace) const
Definition ElementParser.cpp:108
bool parserFailed() const
Definition ElementParser.cpp:26
bool readNextStartElement()
Like QXmlStreamReader::readNextStartElement(), but also checks mParseError.
Definition ElementParser.cpp:32
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.
Definition ElementParser.cpp:72
ElementParser(QSharedPointer< QXmlStreamReader > pXmlReader)
Definition ElementParser.cpp:16
QString readElementText()
Returns the text (simplified()) between the current start element and the corresponding end element.
Definition ElementParser.cpp:38
QStringView getElementName() const
Returns the name of the current element and issues a log message with it.
Definition ElementParser.cpp:100
bool assertNoDuplicateElement(bool pNotYetSeen)
Issues a log warning and sets the error when a duplicate element has been encountered.
Definition ElementParser.cpp:60
void initData(const QByteArray &pXmlData)
Definition ElementParser.cpp:114
void skipCurrentElement() const
Skips parsing of the current element Used to ignore unknown or unrecognized elements while parsing.
Definition ElementParser.cpp:94
bool readUniqueElementText(QString &pText)
Returns the text (simplified()) between the current start element and the corresponding end element,...
Definition ElementParser.cpp:82
void setParserFailed()
Definition ElementParser.cpp:122
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
const QLoggingCategory & getLoggingCategory()
Definition ASN1TemplateUtil.cpp:11