PartSizeItem.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #include "DoubleRange.h"
  3. namespace OTSMODEL {
  4. using namespace OTSDATA;
  5. const int __declspec(dllexport) PART_SIZE_ITEM_NUMBER = 3;
  6. extern const double __declspec(dllexport) PART_LAST_NUMBER;
  7. class __declspec(dllexport) CPartSizeItem : public xmls::ISlo
  8. {
  9. public:
  10. CPartSizeItem(); // constructor
  11. CPartSizeItem(const CPartSizeItem&); // copy constructor
  12. CPartSizeItem(CPartSizeItem*); // copy constructor
  13. CPartSizeItem& operator=(const CPartSizeItem&); // =operator
  14. BOOL operator==(const CPartSizeItem&); // ==operator
  15. virtual ~CPartSizeItem(); // destructor
  16. // serialization
  17. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  18. //void Serialize(double start, double end); // serialization
  19. void BuildList(double start, double end);
  20. // name
  21. CString GetName() { return m_strName; }
  22. void SetName(CString a_strName) { m_strName = a_strName; }
  23. // size level range
  24. CDoubleRangePtr GetSizeLevel() { return m_poSizeLevel; }
  25. void SetSizeLevel(CDoubleRangePtr a_poSizeLevel);
  26. protected:
  27. // cleanup
  28. void Cleanup();
  29. // initialization
  30. void Init();
  31. // duplication
  32. void Duplicate(const CPartSizeItem& a_oSource);
  33. // name
  34. CString m_strName;
  35. // size level range
  36. CDoubleRangePtr m_poSizeLevel;
  37. };
  38. typedef std::shared_ptr<CPartSizeItem> __declspec(dllexport) CPartSizeItemPtr;
  39. typedef std::vector<CPartSizeItemPtr> __declspec(dllexport) CPartSizeItemList;
  40. }