OTSFeature.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include "afx.h"
  3. #include "OTSSegment.h"
  4. #include "XMLSerialization.h"
  5. namespace OTSDATA {
  6. class __declspec(dllexport) COTSFeature : public xmls::ISlo
  7. {
  8. public:
  9. // constructor
  10. COTSFeature(); // constructor
  11. COTSFeature(const COTSFeature&); // copy constructor
  12. COTSFeature(COTSFeature*); // copy constructor
  13. COTSFeature& operator=(const COTSFeature&); // =operator
  14. BOOL operator==(const COTSFeature&); // ==operator
  15. virtual ~COTSFeature(); // destructor
  16. //void Serialize(CArchive& ar); // serialization
  17. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  18. // segments list
  19. COTSSegmentsList& GetSegmentsList() { return m_listSegments; }
  20. void SetSegmentsList(COTSSegmentsList& a_plistSegment, BOOL a_bClear = TRUE);
  21. COTSSegmentPtr GetSegmentByIndex(int a_nIndex);
  22. void AddSegment(COTSSegmentPtr seg);
  23. protected:
  24. // cleanup
  25. void Cleanup();
  26. // initialization
  27. void Init();
  28. // duplication
  29. void Duplicate(const COTSFeature& a_oSource);
  30. // segments list
  31. COTSSegmentsList m_listSegments;
  32. };
  33. typedef std::shared_ptr<COTSFeature> COTSFeaturePtr;
  34. typedef std::vector<COTSFeaturePtr> COTSFeatureList;
  35. }