PosXrayInfo.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #pragma once
  2. #include "Element.h"
  3. namespace OTSDATA
  4. {
  5. class __declspec(dllexport) CPosXrayInfo /*: public xmls::ISlo*/
  6. {
  7. public:
  8. CPosXrayInfo(); // constructor
  9. CPosXrayInfo(const CPosXrayInfo&); // copy constructor
  10. CPosXrayInfo(CPosXrayInfo*); // copy constructor
  11. CPosXrayInfo& operator=(const CPosXrayInfo&); // =operator
  12. BOOL operator==(const CPosXrayInfo&); // ==operator
  13. virtual ~CPosXrayInfo(); // detractor
  14. // serialization
  15. //void Serialize(bool isStoring,tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  16. // position
  17. CPoint GetPosition() const { return m_poiPosition; }
  18. void SetPosition(const CPoint& a_poiPosition) { m_poiPosition = a_poiPosition; }
  19. // index
  20. long GetIndex() const { return m_nIndex; }
  21. void SetIndex(const long a_nIndex) { m_nIndex = a_nIndex; }
  22. // field id
  23. long GetScanFieldId() const { return m_nFieldId; }
  24. void SetScanFieldId(const long a_nScanfieldId) { m_nFieldId = a_nScanfieldId; }
  25. // particle tag id
  26. long GetPartTagId() const { return m_nPartTagId; }
  27. void SetPartTagId(const long a_nPartTagId) { m_nPartTagId = a_nPartTagId; }
  28. // feature id
  29. long GetFeatureId() const { return m_nFeatureId; }
  30. void SetFeatureId(const long a_nFeatureId) { m_nFeatureId = a_nFeatureId; }
  31. // element quantify data
  32. CElementChemistriesList& GetElementQuantifyData() { return m_listElementQuantifyData; }
  33. void AddQuantifyElement(CElementChemistryPtr che) { m_listElementQuantifyData.push_back(che); }
  34. void SetElementQuantifyData(CElementChemistriesList& a_listElementQuantifyData);
  35. void NormalizeXrayQuantifyData();
  36. // record this only for DB
  37. long GetElementNum() { return m_nElementNum; }
  38. void SetElementNum(long a_nElementNum) { m_nElementNum = a_nElementNum; }
  39. protected:
  40. // cleanup
  41. void Cleanup();
  42. // initialization
  43. void Init();
  44. // duplication
  45. void Duplicate(const CPosXrayInfo& a_oSource);
  46. // position
  47. CPoint m_poiPosition;
  48. // index
  49. long m_nIndex;
  50. // field id
  51. long m_nFieldId;
  52. // particle tag id
  53. long m_nPartTagId;
  54. // feature id
  55. long m_nFeatureId;
  56. // element quantify data
  57. CElementChemistriesList m_listElementQuantifyData;
  58. // record this only for DB
  59. long m_nElementNum;
  60. };
  61. typedef std::shared_ptr<CPosXrayInfo> __declspec(dllexport) CPosXrayInfoPtr;
  62. typedef std::vector<CPosXrayInfoPtr> __declspec(dllexport) CPosXrayInfoList;
  63. }