RptParamFile.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #pragma once
  2. #include "XMLSerialization.h"
  3. namespace OTSMODEL {
  4. using namespace OTSDATA;
  5. // report param file mark
  6. const int RPT_PARAM_FILE_MARK = 'R' + 'P' + 'T' + 'P' + 'A' + 'R' + 'A' + 'M';
  7. // report param file version
  8. const CString RPT_PARAM_FILE_VERSION = _T("1.1.1");
  9. // report param file extension
  10. const CString RPT_PARAM_FILE_EXT = _T(".rpf");
  11. const CString RPT_PARAM_FILE_FILTER = _T("Report param Files (*.rpf)|*.rpf||");
  12. class __declspec(dllexport) CRptParamFile : public xmls::ISlo
  13. {
  14. public:
  15. CRptParamFile(); // constructor
  16. CRptParamFile(const CRptParamFile&); // copy constructor
  17. CRptParamFile(CRptParamFile*); // copy constructor
  18. CRptParamFile& operator=(const CRptParamFile&); // =operator
  19. BOOL operator==(const CRptParamFile&); // ==operator
  20. virtual ~CRptParamFile(); // destructor
  21. // serialization
  22. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  23. // file version
  24. CString GetVersion() { return m_strVersion; }
  25. void SetVersion(CString a_strVersion) { m_strVersion = a_strVersion; }
  26. // particle size level file folder
  27. CString GetSizeFileFolder() { return m_strSizeFileFolder; }
  28. void SetSizeFileFolder(CString a_strSizeFileFolder) { m_strSizeFileFolder = a_strSizeFileFolder; }
  29. // triangulation template file folder
  30. CString GetTrigTempFileFolder() { return m_strTrigTempFileFolder; }
  31. void SetTrigTempFileFolder(CString a_strTrigTempFileFolder) { m_strTrigTempFileFolder = a_strTrigTempFileFolder; }
  32. // report template file folder
  33. CString GetRptTempFileFolder() { return m_strRptTempFileFolder; }
  34. void SetRptTempFileFolder(CString a_strRptTempFileFolder) { m_strRptTempFileFolder = a_strRptTempFileFolder; }
  35. // report template file path
  36. CString GetRptTempFilePath() { return m_strRptTempFilePath; }
  37. void SetRptTempFilePath(CString a_strRptTempFilePath) { m_strRptTempFilePath = a_strRptTempFilePath; }
  38. // particle STD analysis file folder
  39. CString GetSTDFileFolder() { return m_strSTDFileFolder; }
  40. void SetSTDFileFolder(CString a_strSTDFileFolder) { m_strSTDFileFolder = a_strSTDFileFolder; }
  41. // scaling factor
  42. double GetScale() { return m_dScale; }
  43. void SetScal(double a_dScale) { m_dScale = a_dScale; }
  44. //show elements col name
  45. CString GetElementsColName() { return m_strElementsColName; }
  46. void SetElementsColName(CString a_strElementsColName) {m_strElementsColName = a_strElementsColName;}
  47. //default computed column name
  48. CString GetDefaultComputedColName() { return m_strDefaultComputedColName; }
  49. void SetDefaultComputedColName(CString a_strDefaultComputedColName) { m_strDefaultComputedColName = a_strDefaultComputedColName; }
  50. protected:
  51. // cleanup
  52. void Cleanup();
  53. // initialization
  54. void Init();
  55. // duplication
  56. void Duplicate(const CRptParamFile& a_oSource);
  57. // file version
  58. CString m_strVersion;
  59. // particle size level file folder
  60. CString m_strSizeFileFolder;
  61. // triangulation template file folder
  62. CString m_strTrigTempFileFolder;
  63. // report template file folder
  64. CString m_strRptTempFileFolder;
  65. // report template file
  66. CString m_strRptTempFilePath;
  67. // particle STD analysis file folder
  68. CString m_strSTDFileFolder;
  69. // scaling factor
  70. double m_dScale;
  71. // show element list list
  72. CString m_strElementsColName;
  73. //default computed column name
  74. CString m_strDefaultComputedColName;
  75. };
  76. typedef std::shared_ptr<CRptParamFile> __declspec(dllexport) CRptParamFilePtr;
  77. }