PosXrayInfo.h 2.5 KB

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