ElementRange.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #include "IntRange.h"
  3. #include "Element.h"
  4. namespace OTSDATA {
  5. // CElementRange command target
  6. class __declspec(dllexport) CElementRange : public xmls::ISlo
  7. {
  8. /*protected:
  9. DECLARE_SERIAL(CElementRange)*/
  10. public:
  11. CElementRange(); // constructor
  12. CElementRange(const CElementRange&); // copy constructor
  13. CElementRange(CElementRange*); // copy constructor
  14. CElementRange& operator=(const CElementRange&); // =operator
  15. BOOL operator==(const CElementRange&); // ==operator
  16. virtual ~CElementRange(); // destructor
  17. // serialization
  18. //void Serialize(CArchive& ar);
  19. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  20. // element
  21. CElementPtr GetElement() { return m_poElement; }
  22. void SetElement(CElementPtr a_poElement);
  23. // % x 100 range
  24. CIntRangePtr GetRange() { return m_poRange; }
  25. void SetRange(CIntRangePtr a_poRange);
  26. protected:
  27. // cleanup
  28. void Cleanup();
  29. // initialization
  30. void Init();
  31. // duplication
  32. void Duplicate(const CElementRange& a_oSource);
  33. // element
  34. CElementPtr m_poElement;
  35. // % x 100 range
  36. CIntRangePtr m_poRange;
  37. };
  38. typedef std::shared_ptr<CElementRange> __declspec(dllexport) CElementRangePtr;
  39. typedef std::vector<CElementRangePtr> __declspec(dllexport) CElementRangeList;
  40. }