MsrParamFileMgr.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "MsrParams.h"
  3. #include "OTSFileSys.h"
  4. #include "OTSHelper.h"
  5. namespace OTSMODEL {
  6. using namespace OTSDATA;
  7. // measurement parameters file mark
  8. const int MRS_PARAM_FILE_MARK = 'M' + 'E' + 'A' + 'S' + 'U' + 'R' + 'E' +'P' + 'A'+ 'R' + 'A' + 'M';
  9. // measurement parameters file version string
  10. const CString MRS_PARAM_FILE_VERSION = _T("1.1.1");
  11. // measurement parameters file
  12. const CString MESUREMENT_PARAM_FILE_EXT = _T(".mrp");
  13. const CString MESUREMENT_PARAM_FILE_FILTER = _T("Measurement Parmeters Files (*.mrp)|*.mrp||");
  14. class __declspec(dllexport) CMsrParamFileMrg : public xmls::ISlo
  15. {
  16. public:
  17. CMsrParamFileMrg(); // constructor
  18. virtual ~CMsrParamFileMrg(); // destructor
  19. // serialization
  20. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  21. // Load/Save
  22. BOOL Load(CString a_strPathName = _T(""), BOOL a_bClear = TRUE);
  23. BOOL Save(CString a_strPathName = _T(""));
  24. // file pathname
  25. CString GetPathName() { return m_strPathName; }
  26. void SetPathName(CString a_strPathName) { m_strPathName = a_strPathName; }
  27. // measurement parameters file
  28. CMsrParamsPtr GetMsrParams() { return m_poMsrParams; }
  29. void SetMsrParamFile(CMsrParamsPtr a_poMsrParams);
  30. protected:
  31. // cleanup
  32. void Cleanup();
  33. // initialization
  34. void Init();
  35. // duplication
  36. void Duplicate(const CMsrParamFileMrg& a_oSource);
  37. // file pathname
  38. CString m_strPathName;
  39. // measurement parameters
  40. CMsrParamsPtr m_poMsrParams;
  41. };
  42. typedef std::shared_ptr<CMsrParamFileMrg> __declspec(dllexport) CMsrParamFileMgrPtr;
  43. }