StageFileClr.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #pragma once
  2. #include "StageFile.h"
  3. #include "StageClr.h"
  4. #include "SEMStageDataClr.h"
  5. namespace OTSINTERFACE {
  6. using namespace System;
  7. using namespace OTSMODEL;
  8. public ref class CStageFileClr : public Object
  9. {
  10. public:
  11. CStageFileClr(); // constructor
  12. CStageFileClr(CStageFileClr^); // copy constructor
  13. CStageFileClr(CStageFilePtr); // copy constructor
  14. CStageFileClr^ operator=(CStageFileClr^); // =operator
  15. ~CStageFileClr();
  16. !CStageFileClr();
  17. CStageFilePtr GetStageFilePtr();
  18. // load/save a stage from a text file
  19. bool LoadStageFromTextFile(String^ a_strFilePathName);
  20. bool SaveStageIntoTextFile(int a_nIndex, String^ a_strFilePathName);
  21. // Load/Save
  22. bool Load(int a_nPackId, bool a_bClear, bool a_bGetFromText);
  23. bool Save(int a_nPackId);
  24. // file pathname
  25. String^ GetPathName() { return gcnew String(mStageFile->get()->GetPathName ()); }
  26. void SetPathName(String^ a_strPathName) { mStageFile->get()->SetPathName (a_strPathName); }
  27. // stages list
  28. CStagesListClr^ GetStagesList();
  29. bool SetStagesList(CStagesListClr^ a_listStages, bool a_bClear);
  30. // modify flag
  31. bool IsModified() { return mStageFile->get()->IsModified (); }
  32. void SetModify(bool a_bModify) { mStageFile->get()->SetModify( a_bModify); }
  33. // SEM stage data
  34. CSEMStageDataClr^ GetStageData() { return gcnew CSEMStageDataClr(mStageFile->get()->GetStageData()); }
  35. bool SetStageData(CSEMStageDataClr^ a_pStageData);
  36. // working stage id
  37. int GetWorkingStageId() { return mStageFile->get()->GetWorkingStageId(); }
  38. void SetWorkingStageId(int a_nWorkingStageId) { mStageFile->get()->SetWorkingStageId ( a_nWorkingStageId); }
  39. // conver SEM cordination to OTS cordination
  40. bool ConverSEMToOTSSystem(CDomainClr^ a_pBoundary, CDomainClr^ a_pSTD, CHoleListClr^ a_listStageHoles);
  41. // conver OTS point to SEM point
  42. bool ConverOTSToSEMPoint(Point^ a_OTSpt, Point^ % a_SEMpt);
  43. // conver SEM point to OTS point
  44. bool ConverSEMToOTSPoint(Point^ a_SEMpt, Point^% a_OTSpt);
  45. // flag there is sample on the stage
  46. void SetInUse(bool a_bVal) { mStageFile->get()->SetInUse (a_bVal); }
  47. bool GetInUse() { return mStageFile->get()->GetInUse (); }
  48. //show stage dialog
  49. CStageFileClr^ ShowStageDialogExport(int a_nPackId, CStageFileClr^ a_pStageFile);
  50. CStageClr^ GetWorkingStage();
  51. protected:
  52. CStageFilePtr* mStageFile;
  53. // duplication
  54. void Duplicate(CStageFileClr^ a_oSource);
  55. };
  56. }