You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

#ifndef XMLREADER_H
#define XMLREADER_H
#include <QObject>
#include <QtXml>
#include "logger/Logger.h"
class XmlReader : public QObject
{
Q_OBJECT
private:
inline void handleError(ESeverityLevel::eSeverityLevel severityLevel,
ELogID::eLogID logID,
QString logText,
bool emitThrow = true) const;
QDomDocument _xmlDoc;
QString _xmlAddress;
QDomElement _root;
QList<QString> _dbNameVector;
QList<QDomElement> _dbElementVector;
public:
XmlReader(QString xmlAddress);
QList<QString> getDatabaseNameList();
QList<QString> getDBTableList(QString DBName);
QList<QString> getDBTableList(QDomElement DBElement);
QString getCreateTableQuery(QString tableName, QString DBName);
QString getCreateTableQuery(QString tableName, QDomElement DBElement);
QString getCreateAllTableQuery(QString DBName);
QString getCreateAllTableQuery(QDomElement DBElement);
QString getCreateInitialInsertQuery(QString DBName);
QString getInsertQuery(QString tableName, QString DBName);
};
#endif //XMLREADER_H