Com.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #pragma once
  2. #include <QObject>
  3. #include <vector>
  4. #include <map>
  5. using namespace std;
  6. typedef struct _tagInf_HO
  7. {
  8. QString strName; //
  9. QString strBase_type;
  10. QString strDimension;
  11. QString strSem_type;
  12. HObject ho_Object;
  13. } H_INTERFACE_HOBJECT;
  14. typedef struct _tagInf_HT
  15. {
  16. QString strName; //
  17. QString strBase_type;
  18. QString strDimension;
  19. QString strSem_type;
  20. HTuple hv_HTuple;
  21. } H_INTERFACE_HTUPLE;
  22. typedef struct _tagH_Function
  23. {
  24. QString strName; //
  25. QString strFunctionName;
  26. // 输入型的图形变量 (数据类型为 HObject)
  27. QVector<H_INTERFACE_HOBJECT> Interfaces_io;
  28. // 输出型的图像变量 (数据类型为 HObject)
  29. QVector<H_INTERFACE_HOBJECT> Interfaces_oo;
  30. // 输入型的控制变量 (数据类型为 HTuple)
  31. QVector<H_INTERFACE_HTUPLE> Interfaces_ic;
  32. // 输出型的控制变量 (数据类型为 HTuple)
  33. QVector<H_INTERFACE_HTUPLE> Interfaces_oc;
  34. QVector<QString> Src;
  35. void Reset()
  36. {
  37. strName.clear();
  38. strFunctionName.clear();
  39. Interfaces_io.clear();
  40. Interfaces_oo.clear();
  41. Interfaces_ic.clear();
  42. Interfaces_oc.clear();
  43. Src.clear();
  44. }
  45. _tagH_Function()
  46. {
  47. }
  48. ~_tagH_Function()
  49. {
  50. this->Reset();
  51. }
  52. } H_FUNCTION;
  53. // 脚本信息结构体
  54. typedef struct _tagHScript
  55. {
  56. QString strFileVersion;
  57. QString strHalconVersion;
  58. vector<H_FUNCTION> Function;
  59. void Reset()
  60. {
  61. strFileVersion.clear();
  62. strHalconVersion.clear();
  63. Function.clear();
  64. }
  65. _tagHScript()
  66. {
  67. }
  68. ~_tagHScript()
  69. {
  70. this->Reset();
  71. }
  72. } H_SCRIPT;