Stage.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. #include "Hole.h"
  3. namespace OTSDATA {
  4. class __declspec(dllexport) CStage :public xmls::ISlo
  5. {
  6. public:
  7. CStage(); // constructor
  8. CStage(const CStage&); // copy constructor
  9. CStage(CStage*); // copy constructor
  10. CStage& operator=(const CStage&); // =operator
  11. BOOL operator==(const CStage&); // ==operator
  12. virtual ~CStage(); // destructor
  13. // serialization
  14. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  15. // stage name
  16. CString GetName() { return m_strName; }
  17. void SetName(CString a_strName) { m_strName = a_strName; }
  18. // boundary
  19. CDomainPtr GetBoundary() { return m_poBourary; }
  20. void SetBoundary(CDomainPtr a_poBourary);
  21. // std
  22. CDomainPtr GetSTD() { return m_poSTD; }
  23. void SetSTD(CDomainPtr a_poSTD);
  24. // sample holes list
  25. CHolesList& GetHoleList() { return m_listHoles; }
  26. void SetHoleList(CHolesList& a_plistHoles, BOOL a_bClear = TRUE);
  27. CHolePtr GetHoleByIndex(int a_nIndex);
  28. CHolePtr GetHoleByName(CString a_strHoleName);
  29. protected:
  30. // cleanup
  31. void Cleanup();
  32. // initialization
  33. void Init();
  34. // duplication
  35. void Duplicate(const CStage& a_oSource);
  36. // stage name
  37. CString m_strName;
  38. // boundary
  39. CDomainPtr m_poBourary;
  40. // std
  41. CDomainPtr m_poSTD;
  42. // sample holes list
  43. CHolesList m_listHoles;
  44. };
  45. typedef std::shared_ptr<CStage> CStagePtr;
  46. typedef std::vector<CStagePtr> CStagesList;
  47. }