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

31 lines
933 B
C++

#ifndef QTADPOLEMAIN_H
#define QTADPOLEMAIN_H
#include "baseStruct.h"
#include "iCoreCtrl.h"
class QTadpoleMain
{
public:
QTadpoleMain(const char *szExePath, const QString& dllPath, IGuiCallback* pCb);
~QTadpoleMain();
static int InitCoreCtrl();
static void FreeCoreCtrl();
public:
static class QTadpoleGlobalData* s_pGlobalData;
static TP_GLOBAL_DATA* s_pGlobal;
static class QTadpoleLoadCoreCtrl* s_pLibCoreCtrl;
static ICoreCtrl* s_pCoreCtrl;
private:
static int s_nLoadCount;
static int s_nInitCount;
};
#define gpTpGlobalData QTadpoleMain::s_pGlobal//s_pGlobalData
#define gpTpCoreCtrl QTadpoleMain::s_pCoreCtrl
#define CoreCtrl_VoidCall(fun, ...) if( NULL != gpTpCoreCtrl ) gpTpCoreCtrl->##fun##(__VA_ARGS__)
#define CoreCtrl_ReturnCall(def, fun, ...) (NULL != gpTpCoreCtrl) ? gpTpCoreCtrl->##fun##(__VA_ARGS__) : def
#endif // QTADPOLEMAIN_H