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. protected:
  23. // cleanup
  24. void Cleanup();
  25. // initialization
  26. void Init();
  27. // duplication
  28. void Duplicate(const COTSFeature& a_oSource);
  29. // segments list
  30. COTSSegmentsList m_listSegments;
  31. };
  32. typedef std::shared_ptr<COTSFeature> COTSFeaturePtr;
  33. typedef std::vector<COTSFeaturePtr> COTSFeatureList;
  34. }