#pragma once #include "StageFile.h" #include "StageClr.h" #include "SEMStageDataClr.h" namespace OTSINTERFACE { using namespace System; using namespace OTSMODEL; public ref class CStageFileClr : public Object { public: CStageFileClr(); // constructor CStageFileClr(CStageFileClr^); // copy constructor CStageFileClr(CStageFilePtr); // copy constructor CStageFileClr^ operator=(CStageFileClr^); // =operator ~CStageFileClr(); !CStageFileClr(); CStageFilePtr GetStageFilePtr(); // load/save a stage from a text file bool LoadStageFromTextFile(String^ a_strFilePathName); bool SaveStageIntoTextFile(int a_nIndex, String^ a_strFilePathName); // Load/Save bool Load(int a_nPackId, bool a_bClear, bool a_bGetFromText); bool Save(int a_nPackId); // file pathname String^ GetPathName() { return gcnew String(mStageFile->get()->GetPathName ()); } void SetPathName(String^ a_strPathName) { mStageFile->get()->SetPathName (a_strPathName); } // stages list CStagesListClr^ GetStagesList(); bool SetStagesList(CStagesListClr^ a_listStages, bool a_bClear); // modify flag bool IsModified() { return mStageFile->get()->IsModified (); } void SetModify(bool a_bModify) { mStageFile->get()->SetModify( a_bModify); } // SEM stage data CSEMStageDataClr^ GetStageData() { return gcnew CSEMStageDataClr(mStageFile->get()->GetStageData()); } bool SetStageData(CSEMStageDataClr^ a_pStageData); // working stage id int GetWorkingStageId() { return mStageFile->get()->GetWorkingStageId(); } void SetWorkingStageId(int a_nWorkingStageId) { mStageFile->get()->SetWorkingStageId ( a_nWorkingStageId); } // conver SEM cordination to OTS cordination bool ConverSEMToOTSSystem(CDomainClr^ a_pBoundary, CDomainClr^ a_pSTD, CHoleListClr^ a_listStageHoles); // conver OTS point to SEM point bool ConverOTSToSEMPoint(Point^ a_OTSpt, Point^ % a_SEMpt); // conver SEM point to OTS point bool ConverSEMToOTSPoint(Point^ a_SEMpt, Point^% a_OTSpt); // flag there is sample on the stage void SetInUse(bool a_bVal) { mStageFile->get()->SetInUse (a_bVal); } bool GetInUse() { return mStageFile->get()->GetInUse (); } //show stage dialog CStageFileClr^ ShowStageDialogExport(int a_nPackId, CStageFileClr^ a_pStageFile); CStageClr^ GetWorkingStage(); protected: CStageFilePtr* mStageFile; // duplication void Duplicate(CStageFileClr^ a_oSource); }; }