PosXray.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include "afx.h"
  3. #include "PosXrayInfo.h"
  4. namespace OTSDATA
  5. {
  6. class __declspec(dllexport) CPosXray : public CPosXrayInfo
  7. {
  8. public:
  9. CPosXray(); // constructor
  10. CPosXray(const CPoint); // constructor
  11. CPosXray(CPosXrayInfo*); // constructor
  12. CPosXray(const CPosXray&); // copy constructor
  13. CPosXray(CPosXray*); // copy constructor
  14. CPosXray& operator=(const CPosXray&); // =operator
  15. virtual ~CPosXray(); // destructor
  16. // serialization
  17. //void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  18. // channels
  19. long GetChannelsNo() const { return GENERALXRAYCHANNELS; }
  20. // x-ray data
  21. DWORD* GetXrayData() const { return (DWORD*)m_nXrayData; }
  22. void SetXrayData(DWORD* a_pnXrayData);
  23. DWORD GetTotalCount() const;
  24. void GetMaxHeightPosition(long& a_nMaxHeight, long& a_nPosition) const;
  25. // clear the x-ray data
  26. // if start position is [0, GENERALXRAYCHANNELS - 1], will do the clear
  27. void ClearXrayData(const long a_nStartPos = -1);
  28. // set x-ray data at channel
  29. void SetXrayDataAtChannel(DWORD a_nXray, const long a_nChannel);
  30. static CElementChemistriesList RemoveFe(CElementChemistriesList a_listElementChemistries);
  31. static CElementChemistriesList RemoveC(CElementChemistriesList a_listElementChemistries);
  32. protected:
  33. // cleanup
  34. void Cleanup();
  35. // initialization
  36. void Init();
  37. // duplication
  38. void Duplicate(const CPosXray& a_oSource);
  39. // x-ray data
  40. DWORD m_nXrayData[GENERALXRAYCHANNELS];
  41. };
  42. typedef std::shared_ptr<CPosXray> __declspec(dllexport) CPosXrayPtr;
  43. typedef std::vector<CPosXrayPtr> __declspec(dllexport) CPosXraysList;
  44. }