InclutionSTDData.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #pragma once
  2. #include "STDItem.h"
  3. #include "XMLSerialization.h"
  4. //#include "Element.h"
  5. namespace OTSClassifyEngine {
  6. using namespace OTSDATA;
  7. typedef enum class __declspec(dllexport) SYS_STD_TYPE
  8. {
  9. INVALID = -1,
  10. MIN = 0,
  11. GENERAL = 0,
  12. SPECIAL1 = 1,
  13. SPECIAL2 = 2,
  14. SPECIAL3 = 3,
  15. SPECIAL4 = 4,
  16. SPECIAL5 = 5,
  17. SPECIAL6 = 6,
  18. SPECIAL7 = 7,
  19. MAX = 7,
  20. USERSTD = 0,
  21. SYSTEMSTD = 1,
  22. SIMPLEOXIDE = 10000,
  23. COMPOSITEOXIDE = 10100,
  24. SULFIDE = 10200,
  25. NITRIDES = 10300,
  26. PHOSPHIDE = 10400
  27. } SYS_STD_TYPE;
  28. //STD MIN&MAX Value
  29. //最小用户标准ID
  30. const int MIN_USER = 1000;
  31. //最大用户标准ID
  32. const int MAX_USER = 10000;
  33. //最小系统标准ID
  34. const int MIN_SYS = 9999;
  35. //最小简单氧化物ID
  36. const int MIN_SIMPLEOXIDE = 9999;
  37. //最大简单氧化物ID
  38. const int MAX_SIMPLEOXIDE = 10100;
  39. //最小复合氧化物ID
  40. const int MIN_COMPOSITEOXIDE = 10099;
  41. //最大复合氧化物ID
  42. const int MAX_COMPOSITEOXIDE = 10200;
  43. //最小硫化物ID
  44. const int MIN_SULFIDE = 10199;
  45. //最大硫化物ID
  46. const int MAX_SULFIDE = 10300;
  47. //最小磷化物ID
  48. const int MIN_PHOSPHIDE = 10299;
  49. //最大磷化物ID
  50. const int MAX_PHOSPHIDE = 10400;
  51. //最小氮化物ID
  52. const int MIN_NITRIDES = 10299;
  53. //最大氮化物ID
  54. const int MAX_NITRIDES = 10400;
  55. //最小摩尔比值
  56. const double MIN_MOLARRATIO = 0.09f;
  57. // CPartSTDData command target
  58. // particle analysis standard file mark
  59. const int PART_STD_FILE_MARK = 'P' + 'A' + 'R' + 'T' + 'S' + 'T' + 'D';
  60. // particle analysis standard file version string
  61. const CString PART_STD_FILE_VERSION = _T("1.1.1");
  62. // particle analysis standard file
  63. const CString STD_FILE_EXT = _T(".std");
  64. const CString STD_FILE_FILTER = _T("Particle Analysis Standard Files (*.std)|*.std||");
  65. class __declspec(dllexport) CInclutionSTDData : public xmls::ISlo
  66. {
  67. public:
  68. CInclutionSTDData(); // constructor
  69. CInclutionSTDData(const CInclutionSTDData&); // copy constructor
  70. CInclutionSTDData(CInclutionSTDData*); // copy constructor
  71. CInclutionSTDData& operator=(const CInclutionSTDData&); // =operator
  72. BOOL operator==(const CInclutionSTDData&); // ==operator
  73. virtual ~CInclutionSTDData(); // destructor
  74. // serialization
  75. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  76. // version
  77. void SetFileVersion(CString a_strVersion) { m_strVersion = a_strVersion; }
  78. CString GetFileVersion() { return m_strVersion; }
  79. // library name
  80. CString GetName() { return m_strName; }
  81. void SetName(CString a_strName) { m_strName = a_strName; }
  82. // elements list
  83. CElementsList& GetElementsList() { return m_listElements; }
  84. void SetElementsList(CElementsList& a_listElements, BOOL a_bClear);
  85. // std items list
  86. CSTDItemsList& GetSTDItemsList() { return m_listSTDItems; }
  87. void SetSTDItemsList(CSTDItemsList& a_listSTDItems, BOOL a_bClear);
  88. // std item
  89. CSTDItemPtr GetSTDItemById(int a_nId);
  90. protected:
  91. // cleanup
  92. void Cleanup();
  93. // initialization
  94. void Init();
  95. // duplication
  96. void Duplicate(const CInclutionSTDData& a_oSource);
  97. // version
  98. CString m_strVersion;
  99. // library name
  100. CString m_strName;
  101. // elements list
  102. CElementsList m_listElements;
  103. // std items list
  104. CSTDItemsList m_listSTDItems;
  105. };
  106. typedef std::shared_ptr<CInclutionSTDData> __declspec(dllexport) CInclutionSTDDataPtr;
  107. typedef std::vector<CInclutionSTDDataPtr> __declspec(dllexport) CInclutionSTDDataList;
  108. }