| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #pragma once
- #include "CppSQLite3.h"
- #if defined(_MSC_VER) || defined(WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32)
- #ifdef _OCC_P_ROLLBACKTOOL_SDK
- #define _OCC_P_ROLLBACKTOOL_API __declspec(dllexport)
- #else
- #define _OCC_P_ROLLBACKTOOL_API __declspec(dllimport)
- #endif
- #else //Linux
- #ifdef _OCC_P_ROLLBACKTOOL_SDK
- #define _OCC_P_ROLLBACKTOOL_API __attribute__ ((visibility("default")))
- #else
- #define _OCC_P_ROLLBACKTOOL_API __attribute__ ((visibility("default")))
- #endif
- #endif //WIN32|WIN64
- class _OCC_P_ROLLBACKTOOL_API CRollBack_ITool
- {
- public:
- CRollBack_ITool(void);
- ~CRollBack_ITool(void);
- private:
- int m_nRBTrainID; //回滚训练号
- int m_nRBPointID; //回滚节点号
- CppSQLite3DB* m_pSaveDB;
- CppSQLite3DB* m_pLoadDB;
-
- public:
- void SetRB_TrainID(int nTrainID) { m_nRBTrainID = nTrainID; }
- void SetRB_PointID(int nPointID) { m_nRBPointID = nPointID; }
- BOOL Check_IsRight_RollBackCmd(int nTrainID, int nPointID);
- //获取数据库
- CppSQLite3DB* GetSaveDB() { return m_pSaveDB; }
- CppSQLite3DB* GetLoadDB() { return m_pLoadDB; }
- //打开数据库
- BOOL Open_SaveDB(int nTrainID, int nPointID);
- BOOL Open_LoadDB(int nTrainID, int nPointID);
- };
|