OTSSampleClr.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. #pragma once
  2. #include "MsrParamsClr.h"
  3. #include "DomainClr.h"
  4. #include "SEMDataMsrClr.h"
  5. #include "MsrSampleStatusClr.h"
  6. #include "MsrResultsClr.h"
  7. #include "OTSSample.h"
  8. #include "PropItemClr.h"
  9. #include "ProjMgrClr.h"
  10. namespace OTSINTERFACE {
  11. using namespace System;
  12. using namespace OTSMODEL;
  13. using namespace Newtonsoft::Json::Linq;
  14. ref class CProjMgrClr;
  15. typedef System::Collections::Generic::List<String^> CStringListClr;
  16. public ref class COTSSampleClr : public Object
  17. {
  18. public:
  19. COTSSampleClr(); // constructor
  20. COTSSampleClr(COTSSamplePtr); // copy constructor
  21. ~COTSSampleClr();
  22. !COTSSampleClr();
  23. JObject^ GetJSONProperty();
  24. COTSSamplePtr GetSamplePtr();
  25. // name
  26. String^ GetName() { return gcnew String(theSample->get()->GetName()); }
  27. void SetName(String^ a_strName) { theSample->get()->SetName(CString(a_strName)); }
  28. // sample hole
  29. String^ GetSampleHoleName() { return gcnew String(theSample->get()->GetSampleHoleName ()); }
  30. void SetSampleHoleName(String^ a_strHoleName) { theSample->get()->SetSampleHoleName (CString(a_strHoleName)); }
  31. // param lock
  32. bool GetParamLock() { return theSample->get()->GetParamLock (); }
  33. void SetParamLock(bool a_bParamLock) { theSample->get()->SetParamLock (a_bParamLock); }
  34. // switch
  35. bool GetSwitch() { return theSample->get()->GetSwitch (); }
  36. void SetSwitch(bool a_bSwitch) { theSample->get()->SetSwitch (a_bSwitch); }
  37. // measurement parameter
  38. CMsrParamsClr^ GetMsrParams() { return gcnew CMsrParamsClr(theSample->get()->GetMsrParams()); }
  39. void SetMsrParams(CMsrParamsClr^ a_poMsrParams) { theSample->get()->SetMsrParams(a_poMsrParams->GetMsrParamsPtr()); }
  40. // measurement area
  41. CDomainClr^ GetMsrArea() { return gcnew CDomainClr(theSample->get()->GetMsrArea()); }
  42. void SetMsrArea(CDomainClr^ a_poMsrArea)
  43. {
  44. theSample->get()->SetMsrArea(a_poMsrArea->GetDomainPtr());
  45. }
  46. // SEM data (measurement)
  47. CSEMDataMsrClr^ GetSEMDataMsr() { return gcnew CSEMDataMsrClr(theSample->get()->GetSEMDataMsr ()); }
  48. void SetSEMDataMsr(CSEMDataMsrClr^ a_poSEMDataMsr) { theSample->get()->SetSEMDataMsr(a_poSEMDataMsr->GetSEMDataMsrPtr()); }
  49. // measure status
  50. CMsrSampleStatusClr^ GetMsrStatus() { return gcnew CMsrSampleStatusClr(theSample->get()->GetMsrStatus()); }
  51. void SetMsrStatus(CMsrSampleStatusClr^ a_poMsrStatus) { theSample->get()->SetMsrStatus(a_poMsrStatus->GetMsrSampleStatusPtr()); }
  52. // measure results
  53. CMsrResultsClr^ GetMsrResults() { return gcnew CMsrResultsClr(theSample->get()->GetMsrResults()) ; }
  54. void SetMsrResults(CMsrResultsClr^ a_poMsrResults) { theSample->get()->SetMsrResults(a_poMsrResults->GetMsrResultsPtr()); }
  55. // has measure results test
  56. bool HasMeasureResult();
  57. //设置属性组
  58. // 输入:无
  59. // 输出:设置结果,bool, true:设置成功,false:设置失败
  60. bool SetPropItemGrps();
  61. //根据索引获取属性组
  62. // 输入:int 索引值
  63. // 输出:CPropItemGrpClr 返回属性组
  64. CPropItemGrpClr^ GetPropItemGrpByIndex(int a_nIndex);
  65. //根据属性组Id获取属性组
  66. // 输入:int, id值
  67. // 输出:CPropItemGrpClr 返回属性组
  68. CPropItemGrpClr^ GetPropItemGrpById(int a_nId);
  69. //更新相关联属性组
  70. // 输入:int, nId属性组id
  71. // 输出:CPropItemGrpClr^ 返回属性组
  72. CPropItemGrpClr^ UpdatePropItemGrp(int a_nId);
  73. //根据属性Id获取属性
  74. // 输入:int, 属性id
  75. // 输出:CPropItemClr^ 返回的属性
  76. CPropItemClr^ GetPropItemById(int a_nId);
  77. // BOOL data (1)
  78. //获取bool类型的数值
  79. // 输入:int :属性在属性组内id bool 返回的获取值
  80. // 输出: 获取结果, bool, true:成功,false:失败
  81. bool GetPropBOOLData(int a_nId, bool% a_bValue);
  82. //设定属性值
  83. // 输入:int,属性id ;bool,需要设定的值
  84. // 输出:bool,设定结果,true,成功,false, 失败
  85. bool SetPropBOOLData(int a_nId, bool a_bValue);
  86. // int data (16)
  87. //获取int类型的数值
  88. // 输入:int :属性在属性组内id int 返回的获取值
  89. // 输出: 获取结果, bool, true:成功,false:失败
  90. bool GetPropIntData(int a_nId, int% a_nValue);
  91. //设定属性值
  92. // 输入:int,属性id ;int,需要设定的值
  93. // 输出:bool,设定结果,true,成功,false, 失败
  94. bool SetPropIntData(int a_nId, int a_nValue);
  95. // double data (4)
  96. //获取double类型的数值
  97. // 输入:int :属性在属性组内id double 返回的获取值
  98. // 输出: 获取结果, bool, true:成功,false:失败
  99. bool GetPropDoubleData(int a_nId, double% a_dValue);
  100. //设定属性值
  101. // 输入:int,属性id ;double,需要设定的值
  102. // 输出:bool,设定结果,true,成功,false, 失败
  103. bool SetPropDoubleData(int a_nId, double a_dValue);
  104. // string data (7)
  105. //获取string类型的数值
  106. // 输入:int :属性在属性组内id string 返回的获取值
  107. // 输出: 获取结果, bool, true:成功,false:失败
  108. bool GetPropStringData(int a_nId, String^% a_strValue);
  109. //设定属性值
  110. // 输入:int,属性id ;string,需要设定的值
  111. // 输出:bool,设定结果,true,成功,false, 失败
  112. bool SetPropStringData(int a_nId, String^ a_strValue);
  113. // combo data (7)
  114. //获取Combo类型的数值
  115. // 输入:int :属性在属性组内id Combo 返回的获取值
  116. // 输出: 获取结果, bool, true:成功,false:失败
  117. bool GetPropComboData(int a_nId, int% a_nValue);
  118. //设定属性值
  119. // 输入:int,属性id ;string,需要设定的值
  120. // 输出:bool,设定结果,true,成功,false, 失败
  121. bool SetPropComboData(int a_nId, int a_nValue);
  122. //获取Combo字符串类型
  123. // 输入:int,属性id,List<string> 返回的字符串
  124. // 输出:bool,设定结果,true,成功,false, 失败
  125. bool GetPropComboStrings(int a_nId, CStringListClr^% a_listComboStrings);
  126. // time data (2)
  127. //获取Time类型的数值
  128. // 输入:int :属性在属性组内id Time 返回的获取值
  129. // 输出: 获取结果, bool, true:成功,false:失败
  130. bool GetPropTimeData(int a_nId, DateTime^% a_oValue);
  131. //设定属性值
  132. // 输入:int,属性id, DateTime,返回值
  133. // 输出:bool,设定结果,true,成功,false,失败
  134. bool SetPropTimeData(int a_nId, DateTime^ a_oValue);
  135. // time span data (1)
  136. //获取TimeSpan类型的数值
  137. // 输入:int :属性在属性组内id TimeSpan 返回的获取值
  138. // 输出: 获取结果, bool, true:成功,false:失败
  139. bool GetPropTimeSpanData(int a_nId, TimeSpan^% a_oValue);
  140. //设定属性值
  141. // 输入:int,属性id, TimeSpan,返回值
  142. // 输出:bool,设定结果,true,成功,false,失败
  143. bool SetPropTimeSpanData(int a_nId, TimeSpan^ a_oValue);
  144. // file list data (2)
  145. bool GetPropFileListData(int a_nId, String^% a_strFileName);
  146. bool SetPropFileListData(int a_nId, String^ a_strFileName);
  147. //获取相关属性值
  148. // 输入:int,属性id, int,返回相关属性值
  149. // 输出:bool,设定结果,true,成功,false,失败
  150. // get related property item
  151. bool GetRelatedPropItem(int a_nId, int% a_nRelatedPropId);
  152. //获取相关属性组
  153. // 输入:int,属性id, int,返回相关属性组
  154. // 输出:bool,设定结果,true,成功,false,失败
  155. // get related property item group
  156. bool GetRelatedPropItemGrp(int a_nId, int% a_nRelatedPropGrpId);
  157. bool GetBSESize(int% a_nWidth, int% a_nHeight);
  158. private:
  159. COTSSamplePtr* theSample;
  160. };
  161. typedef System::Collections::Generic::List<COTSSampleClr^> COTSSamplesListClr;
  162. }