64 lines
1.3 KiB
C++
Executable File
64 lines
1.3 KiB
C++
Executable File
/**
|
|
* AES Function Topic Client test executable
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "aes_test_base.h"
|
|
|
|
#include <QSqlDriver>
|
|
#include <QSqlDatabase>
|
|
#include <QtSql/QSqlError>
|
|
|
|
#include <AreaEffectSimulation/aes_enums.hpp>
|
|
#include <AreaEffectSimulation/aes_db.h>
|
|
#include <AreaEffectSimulation/logger.h>
|
|
|
|
#include <ngldb/nsqlquery.h>
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
class ConvertMineArea : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ConvertMineArea(QObject *parent);
|
|
|
|
bool init(int exerciseId);
|
|
bool tryConvertMineArea();
|
|
QString getTableName(const QString &tableName) const;
|
|
|
|
|
|
bool initDB(const QString &dbUser,
|
|
const QString &dbPasswd,
|
|
const QString &dbDriver,
|
|
const QString &dbHost,
|
|
const QString &dbName);
|
|
bool initDBInternal();
|
|
|
|
QString schemaName() const;
|
|
QString dbUser() const;
|
|
const QSqlDatabase &database() const { return m_dbConnection; }
|
|
void setEmitMessageOnError(bool bEmit) ;
|
|
QSqlError getLastError() const;
|
|
|
|
private:
|
|
QSqlDatabase m_dbConnection;
|
|
NSqlQuery *m_query;
|
|
QSqlError m_lastError;
|
|
int m_exerciseId;
|
|
bool m_bEmitMessageOnError;
|
|
bool m_bCanHandleSchemas;
|
|
bool m_ownDatabaseConnection;
|
|
|
|
LOGGER_T m_logger;
|
|
|
|
|
|
};
|
|
|
|
} // namespace AreaEffectSimulation
|