OTSSegment.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #include "afx.h"
  3. #include "XMLSerialization.h"
  4. namespace OTSDATA {
  5. // COTSSegment
  6. class __declspec(dllexport) COTSSegment : public xmls::ISlo
  7. {
  8. public:
  9. // constructor
  10. COTSSegment(); // constructor
  11. COTSSegment(long a_nHeight, long a_nStart, long a_nLength); // constructor
  12. COTSSegment(const COTSSegment&); // copy constructor
  13. COTSSegment(COTSSegment*); // copy constructor
  14. COTSSegment& operator=(const COTSSegment&); // =operator
  15. BOOL operator==(const COTSSegment&); // ==operator
  16. virtual ~COTSSegment(); // destructor
  17. // serialization
  18. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  19. long GetHeight() { return m_nHeight; }
  20. void SetHeight(long a_nHeight) { m_nHeight = a_nHeight; }
  21. long GetStart() { return m_nStart; }
  22. void SetStart(long a_nStart) { m_nStart = a_nStart; }
  23. long GetLength() { return m_nLength; }
  24. void SetLength(long a_nLength) { m_nLength = a_nLength; }
  25. BOOL UpDownConection(const COTSSegment &a_Segment);
  26. protected:
  27. // cleanup
  28. void Cleanup();
  29. // initialization
  30. void Init();
  31. // duplication
  32. void Duplicate(const COTSSegment& a_oSource);
  33. // height
  34. long m_nHeight;
  35. // start
  36. long m_nStart;
  37. // length
  38. long m_nLength;
  39. };
  40. typedef std::shared_ptr<COTSSegment> __declspec(dllexport) COTSSegmentPtr;
  41. typedef std::vector<COTSSegmentPtr> __declspec(dllexport) COTSSegmentsList;
  42. }