PosXrayInfo.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 SetElementQuantifyData(CElementChemistriesList& a_listElementQuantifyData);
  34. void NormalizeXrayQuantifyData();
  35. // record this only for DB
  36. long GetElementNum() { return m_nElementNum; }
  37. void SetElementNum(long a_nElementNum) { m_nElementNum = a_nElementNum; }
  38. protected:
  39. // cleanup
  40. void Cleanup();
  41. // initialization
  42. void Init();
  43. // duplication
  44. void Duplicate(const CPosXrayInfo& a_oSource);
  45. // position
  46. CPoint m_poiPosition;
  47. // index
  48. long m_nIndex;
  49. // field id
  50. long m_nFieldId;
  51. // particle tag id
  52. long m_nPartTagId;
  53. // feature id
  54. long m_nFeatureId;
  55. // element quantify data
  56. CElementChemistriesList m_listElementQuantifyData;
  57. // record this only for DB
  58. long m_nElementNum;
  59. };
  60. typedef std::shared_ptr<CPosXrayInfo> __declspec(dllexport) CPosXrayInfoPtr;
  61. typedef std::vector<CPosXrayInfoPtr> __declspec(dllexport) CPosXrayInfoList;
  62. }