OTSFeature.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. /*protected:
  9. DECLARE_SERIAL(COTSFeature)*/
  10. public:
  11. // constructor
  12. COTSFeature(); // constructor
  13. COTSFeature(const COTSFeature&); // copy constructor
  14. COTSFeature(COTSFeature*); // copy constructor
  15. COTSFeature& operator=(const COTSFeature&); // =operator
  16. BOOL operator==(const COTSFeature&); // ==operator
  17. virtual ~COTSFeature(); // destructor
  18. //void Serialize(CArchive& ar); // serialization
  19. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  20. // segments list
  21. COTSSegmentsList& GetSegmentsList() { return m_listSegments; }
  22. void SetSegmentsList(COTSSegmentsList& a_plistSegment, BOOL a_bClear = TRUE);
  23. COTSSegmentPtr GetSegmentByIndex(int a_nIndex);
  24. protected:
  25. // cleanup
  26. void Cleanup();
  27. // initialization
  28. void Init();
  29. // duplication
  30. void Duplicate(const COTSFeature& a_oSource);
  31. // segments list
  32. COTSSegmentsList m_listSegments;
  33. };
  34. typedef std::shared_ptr<COTSFeature> COTSFeaturePtr;
  35. typedef std::vector<COTSFeaturePtr> COTSFeatureList;
  36. }