CConfigBaseManage.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "CppSQLite3.h"
  3. #include "dt.h"
  4. #include "CProduct.h"
  5. #include "CMachineSetup.h"
  6. #define CONFIG_BASE_DLL
  7. #define DATABASEOPERATE_DLL
  8. #include "CConfigBase.h"
  9. #include <string>
  10. #include <windows.h>
  11. #include <mutex>
  12. using namespace std;
  13. namespace ns_db
  14. {
  15. class __declspec(dllexport) CConfigBaseManage
  16. {
  17. private:
  18. std::map<std::string, CConfigBase*> g_mapConfigBase;
  19. public:
  20. static CConfigBaseManage* GetInstance();
  21. static CConfigBaseManage* m_pInstance;
  22. static std::mutex m_Mutex;
  23. CConfigBaseManage();
  24. void AddConfigBase(std::string sTableName,CConfigBase* pConfigBase);
  25. CConfigBase* GetCofigBasePtr(std::string sTableName);
  26. LONG GetConfigParam(string sTableName, vector<CONFIG_BASE_STRUCT>& vecconfig);
  27. LONG GetConfigParam(string sTableName, vector<MODULE_CONFIG_STRUCT>* vecModuleConfig);
  28. LONG SetConfigParam(string sTableName, vector<CONFIG_BASE_STRUCT>* vecBaseConfig, vector<MODULE_CONFIG_STRUCT> vecModuleConfig);
  29. LONG SetConfigParam(string sTableName, vector<MODULE_CONFIG_STRUCT> vecconfig);
  30. LONG SetConfigParam(string sTableName, vector<CONFIG_BASE_STRUCT> vecconfig);
  31. };
  32. }