HDevEngineCpp.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*****************************************************************************
  2. * HDevEngineCpp.h
  3. *****************************************************************************
  4. *
  5. * Description: Interface for executing HDevelop programs and procedures
  6. * within a C++ application using the HALCON/C++ interface.
  7. * Attention: This engine uses the new HALCON/C++ interface that was
  8. * introduced in HALCON 11.
  9. * If your HDevEngine application was developed with a prior
  10. * version of HALCON and uses the old HALCON/C++ interface
  11. * We recommend to migrate it to the new HALCON/C++ interface.
  12. * However, if this is not possible, you can use the legacy
  13. * HDevEngine from the path
  14. * %HALCONROOT%/include/hdevengine10
  15. * In addition, your application must be linked against the
  16. * libraries halconcpp10 and hdevenginecpp10 (instead of
  17. * halconcpp and hdevenginecpp).
  18. * Changes within the source files are not needed.
  19. *
  20. * (c) 1996-2018 by MVTec Software GmbH
  21. * www.mvtec.com
  22. *
  23. *****************************************************************************/
  24. #ifndef H_DEV_ENGINE_CPP_H
  25. #define H_DEV_ENGINE_CPP_H
  26. // include the HALCON 11 C++ interface
  27. #include "halconcpp/HalconCpp.h"
  28. #ifndef HDEV_PD
  29. # define HDEV_PD \
  30. private: \
  31. class Data; \
  32. Data* mData
  33. #endif
  34. namespace HDevEngineCpp
  35. {
  36. // Forward declarations
  37. class HDevEngine;
  38. class HDevProgram;
  39. class HDevProgramCall;
  40. class HDevProcedure;
  41. class HDevProcedureCall;
  42. class HDevEngineException;
  43. class HDevOperatorImplCpp;
  44. /*****************************************************************************
  45. *****************************************************************************
  46. ** class HDevEngine
  47. **===========================================================================
  48. ** Class for managing global engine settings:
  49. ** + external procedure path
  50. ** + implementation of dev_ operators (HDevOperatorImpl)
  51. ** + Attention: all changes made to one HDevEngine instance are global
  52. ** for all .dev programs or .dvp procedure that are executed in one
  53. ** application
  54. *****************************************************************************
  55. *****************************************************************************/
  56. class LIntExport HDevEngine
  57. {
  58. public:
  59. HDevEngine();
  60. // Via engine attributes the behavior of the engine can be configured
  61. // currently the following flags are supported:
  62. // "ignore_unresolved_lines" [default: false, 0]
  63. // - if set to true (or "true"), program lines that refer to an
  64. // unresolved procedure are ignored, i.e., the program or procedure is
  65. // executed without the corrupted program line;
  66. // this may lead to an unexpected behavior or an error during the
  67. // program execution
  68. // - as the default an exception is thrown while creating the program or
  69. // procedure instance
  70. // "ignore_invalid_lines" [default: false, 0]
  71. // - if set to true (or "true"), invalid program lines are ignored,
  72. // i.e., the program or procedure is executed without the corrupted
  73. // program line;
  74. // this may lead to an unexpected behavior or an error during the
  75. // program execution
  76. // - as the default an exception is thrown while creating the program or
  77. // procedure instance
  78. // "ignore_invalid_results" [default: true, 1]
  79. // - if set to false (or "false") throw an exception if the accessed
  80. // procedure output parameter or program variable is invalid
  81. // - the following methods are concerned:
  82. // HenProgramCall::GetIconicVarObject()
  83. // HenProgramCall::GetCtrlVarTuple()
  84. // HenProcedureCall::GetOutputIconicParamObject()
  85. // HenProcedureCall::GetOutputCtrlParamTuple()
  86. // - as the default an empty region object or an empty tuple is returned
  87. // if the object was not set within the program or procedure
  88. // "docu_language" [default: "" -> en_US]
  89. // - could be set to "en_US","de_DE", other languages
  90. // "docu_encoding" [default: "" -> "utf8"]
  91. // - if set to "native" all natural language strings are converted
  92. // to native encoding
  93. // "execute_procedures_jit_compiled" [default: false, 0]
  94. // - if set to true (or "true"), procedures are tried to being compiled
  95. // with a just-in-time compiler for faster execution
  96. // "debug_port" [default: 57786]
  97. // - specifies the port number of the socket where the debug server
  98. // waits for incoming connections
  99. // "debug_password" [default: ""]
  100. // - specifying a password provides a basic layer of protection
  101. // against misuse. For security reasons, it is highly recommended
  102. // to always supply a password. If a password is set, it must be
  103. // entered in HDevelop to allow the connection
  104. // "debug_wait_for_connection" [default: false]
  105. // - if set to true, the engine switches into "stopped state"
  106. // after starting the debug server (see below). This has the effect
  107. // that any application thread that enters procedure execution
  108. // via HDevEngine will stop on the first line of script code.
  109. // This way, you can start debugging from the beginning of your code
  110. // upon connecting from HDevelop
  111. void SetEngineAttribute(const char* name, const HalconCpp::HTuple& value);
  112. HalconCpp::HTuple GetEngineAttribute(const char* name);
  113. // Set path(s) for external procedures
  114. // - several paths can be passed together separating them by ';' or ':'
  115. // on Windows or UNIX-like systems resp.
  116. // - NULL removes all procedure paths and unloads all external procedures
  117. // (Attention: procedures that are used by programs (HDevProgram) or
  118. // procedures (HDevProcedures) remain unchanged until the program or
  119. // procedure is reloaded explicitly. The appropriate calls must be
  120. // recreated or reassigned by the reloaded program or procedure.)
  121. // - additional calls of SetProcedurePath will remove paths set before
  122. // and unload all external procedures
  123. void SetProcedurePath(const char* path);
  124. void AddProcedurePath(const char* path);
  125. #ifdef _WIN32
  126. void SetProcedurePath(const wchar_t* path);
  127. void AddProcedurePath(const wchar_t* path);
  128. #endif
  129. // Get names of all available external procedures
  130. HalconCpp::HTuple GetProcedureNames() const;
  131. // Get names of all loaded external procedures
  132. HalconCpp::HTuple GetLoadedProcedureNames() const;
  133. // Unload a specific procedure <proc_name>
  134. void UnloadProcedure(const char* proc_name);
  135. // Unload all external procedures
  136. void UnloadAllProcedures();
  137. // Starts the debug server that allows to attach HDevelop as
  138. // as debugger to step through engine code. With default settings
  139. // server waits on port 57786 and engine runs normally until HDevelop
  140. // is connected and F9 is pressed to stop execution.
  141. void StartDebugServer();
  142. // Stops the debug server (resuming execution if stopped)
  143. void StopDebugServer();
  144. // global variable access
  145. HalconCpp::HTuple GetGlobalIconicVarNames() const;
  146. HalconCpp::HTuple GetGlobalCtrlVarNames() const;
  147. // get dimension of a global variable
  148. int GetGlobalIconicVarDimension(const char* var_name) const;
  149. int GetGlobalCtrlVarDimension(const char* var_name) const;
  150. // get value of a global variable
  151. HalconCpp::HObject GetGlobalIconicVarObject(const char* var_name);
  152. HalconCpp::HTuple GetGlobalCtrlVarTuple(const char* var_name);
  153. HalconCpp::HObjectVector GetGlobalIconicVarVector(const char* var_name);
  154. HalconCpp::HTupleVector GetGlobalCtrlVarVector(const char* var_name);
  155. // these method is provided for efficiency:
  156. // the results are copied directly into the tuple variable provided by
  157. // the user without additional copying
  158. void GetGlobalCtrlVarTuple(const char* var_name, HalconCpp::HTuple* tuple);
  159. // set global variable
  160. void SetGlobalIconicVarObject(const char* var_name, const HalconCpp::HObject& obj);
  161. void SetGlobalCtrlVarTuple(const char* var_name, const HalconCpp::HTuple& tuple);
  162. void SetGlobalIconicVarVector(const char* var_name, const HalconCpp::HObjectVector& vector);
  163. void SetGlobalCtrlVarVector(const char* var_name, const HalconCpp::HTupleVector& vector);
  164. // Set implementation for HDevelop internal operators
  165. void SetHDevOperatorImpl(HDevOperatorImplCpp* hdev_op_impl);
  166. };
  167. /*****************************************************************************
  168. *****************************************************************************
  169. ** class HDevProgram
  170. **===========================================================================
  171. ** Class for managing HDevelop programs
  172. *****************************************************************************
  173. *****************************************************************************/
  174. class LIntExport HDevProgram
  175. {
  176. HDEV_PD;
  177. public:
  178. // Create a program from a .dev program file
  179. HDevProgram(const char* file_name = NULL);
  180. #ifdef _WIN32
  181. HDevProgram(const wchar_t* file_name);
  182. #endif
  183. // Copy constructor
  184. HDevProgram(const HDevProgram& hdev_prog);
  185. HDevProgram(const Data& data);
  186. // Assignment operation
  187. HDevProgram& operator=(const HDevProgram& hdev_prog);
  188. // Destructor
  189. virtual ~HDevProgram();
  190. // Load a program if not yet done during construction
  191. void LoadProgram(const char* file_name);
  192. #ifdef _WIN32
  193. void LoadProgram(const wchar_t* file_name);
  194. #endif
  195. // check whether the program was successfully loaded
  196. bool IsLoaded() const;
  197. // Get the program name
  198. const char* GetName() const;
  199. // Get the names of all local and the used external procedures
  200. HalconCpp::HTuple GetUsedProcedureNames() const;
  201. HalconCpp::HTuple GetLocalProcedureNames() const;
  202. // Compile all procedures that are used by the program and that can be
  203. // compiled with a just-in-time compiler.
  204. // The method returns true when all used procedures could be compiled by the
  205. // just-in-time compiler.
  206. // Procedures that could not be compiled are called normally by the
  207. // HDevEngine interpreter.
  208. // To check which procedure could not be compiled and what the reason is for
  209. // that start HDevelop and check there the compilation states.
  210. bool CompileUsedProcedures();
  211. // create a program call for execution
  212. HDevProgramCall CreateCall() const;
  213. // This is a method provided for convenience:
  214. // execute the program and return the program call for
  215. // accessing the variables of the program's main procedure
  216. HDevProgramCall Execute() const;
  217. // get some information about the variables of the program's main procedure:
  218. // - get the variable names as a tuple
  219. HalconCpp::HTuple GetIconicVarNames() const;
  220. HalconCpp::HTuple GetCtrlVarNames() const;
  221. // - get the number of iconic and control variables
  222. size_t GetIconicVarCount() const;
  223. size_t GetCtrlVarCount() const;
  224. // - get the names of the variables
  225. // (indices of the variables run from 1 to count)
  226. const char* GetIconicVarName(size_t var_idx) const;
  227. const char* GetCtrlVarName(size_t var_idx) const;
  228. // - get the dimensions of the variables
  229. // (indices of the variables run from 1 to count)
  230. int GetIconicVarDimension(size_t var_idx) const;
  231. int GetCtrlVarDimension(size_t var_idx) const;
  232. };
  233. /*****************************************************************************
  234. *****************************************************************************
  235. ** class HDevProgramCall
  236. **===========================================================================
  237. ** Class for managing the execution of an HDevelop program
  238. *****************************************************************************
  239. *****************************************************************************/
  240. class LIntExport HDevProgramCall
  241. {
  242. HDEV_PD;
  243. public:
  244. // Create an empty HDevelop program call instance
  245. HDevProgramCall();
  246. // Create an HDevelop program call from a program
  247. HDevProgramCall(const HDevProgram& prog);
  248. // Copy constructor
  249. HDevProgramCall(const HDevProgramCall& hdev_prog_call);
  250. HDevProgramCall(const Data& data);
  251. // Assignment operation
  252. HDevProgramCall& operator=(const HDevProgramCall& hdev_prog_call);
  253. // Destructor
  254. virtual ~HDevProgramCall();
  255. // Get the program
  256. HDevProgram GetProgram() const;
  257. // Execute program
  258. void Execute();
  259. // Stop execution on first line of program. This is intended for debugging
  260. // purposes when you wish to step through a specific program call. It only
  261. // has an effect when a debug server is running and it will only stop once.
  262. void SetWaitForDebugConnection(bool wait_once);
  263. // Clear program and reset callstack
  264. // - this method stops the execution of the program after the current
  265. // program line
  266. void Reset();
  267. // Get the objects / values of the variables by name or by index
  268. // (indices of the variables run from 1 to count)
  269. HalconCpp::HObject GetIconicVarObject(size_t var_idx);
  270. HalconCpp::HObject GetIconicVarObject(const char* var_name);
  271. HalconCpp::HObjectVector GetIconicVarVector(size_t var_idx);
  272. HalconCpp::HObjectVector GetIconicVarVector(const char* var_name);
  273. HalconCpp::HTuple GetCtrlVarTuple(size_t var_idx);
  274. HalconCpp::HTuple GetCtrlVarTuple(const char* var_name);
  275. HalconCpp::HTupleVector GetCtrlVarVector(size_t var_idx);
  276. HalconCpp::HTupleVector GetCtrlVarVector(const char* var_name);
  277. // these methods are provided for efficiency:
  278. // the results are copied directly into the tuple variable provided by
  279. // the user without additional copying
  280. void GetCtrlVarTuple(size_t var_idx, HalconCpp::HTuple* tuple);
  281. void GetCtrlVarTuple(const char* var_name, HalconCpp::HTuple* tuple);
  282. };
  283. /*****************************************************************************
  284. *****************************************************************************
  285. ** class HDevProcedure
  286. **===========================================================================
  287. ** Class for managing HDevelop procedures
  288. *****************************************************************************
  289. *****************************************************************************/
  290. class LIntExport HDevProcedure
  291. {
  292. HDEV_PD;
  293. public:
  294. // Create HDevelop procedure from external or local procedure
  295. HDevProcedure(const char* proc_name = NULL);
  296. HDevProcedure(const char* prog_name, const char* proc_name);
  297. HDevProcedure(const HDevProgram& prog, const char* proc_name);
  298. #ifdef _WIN32
  299. HDevProcedure(const wchar_t* prog_name, const char* proc_name);
  300. #endif
  301. // Copy constructor
  302. HDevProcedure(const HDevProcedure& hdev_proc);
  303. HDevProcedure(const Data& data);
  304. // Assignment operation
  305. HDevProcedure& operator=(const HDevProcedure& proc);
  306. // Destructor
  307. ~HDevProcedure();
  308. // Load a procedure if not yet done during construction
  309. void LoadProcedure(const char* proc_name);
  310. void LoadProcedure(const char* prog_name, const char* proc_name);
  311. void LoadProcedure(const HDevProgram& prog, const char* proc_name);
  312. #ifdef _WIN32
  313. void LoadProcedure(const wchar_t* prog_name, const char* proc_name);
  314. #endif
  315. // Check whether the procedure was successfully loaded
  316. bool IsLoaded() const;
  317. // Get the name of the procedure
  318. const char* GetName() const;
  319. // Get the short description of the procedure. The encoding of the
  320. // description will be in local 8 bit or utf-8, depending on the
  321. // HALCON/C++ interface encoding. Note there is no wchar_t overload for
  322. // Windows applications compiled with UNICODE support; however, you can
  323. // access the description using GetInfo("short").S().TextW() instead.
  324. const char* GetShortDescription() const;
  325. // Get all refered procedures
  326. HalconCpp::HTuple GetUsedProcedureNames() const;
  327. // Compile all procedures that are used by the procedure and that can be
  328. // compiled with a just-in-time compiler.
  329. // The method returns true when all used procedures could be compiled by the
  330. // just-in-time compiler.
  331. // Procedures that could not be compiled are called normally by the
  332. // HDevEngine interpreter.
  333. // To check which procedure could not be compiled and what the reason is for
  334. // that start HDevelop and check there the compilation states.
  335. bool CompileUsedProcedures();
  336. // Create a program call for execution
  337. HDevProcedureCall CreateCall() const;
  338. // Get name of input/output object/control parameters
  339. HalconCpp::HTuple GetInputIconicParamNames() const;
  340. HalconCpp::HTuple GetOutputIconicParamNames() const;
  341. HalconCpp::HTuple GetInputCtrlParamNames() const;
  342. HalconCpp::HTuple GetOutputCtrlParamNames() const;
  343. // Get number of input/output object/control parameters
  344. int GetInputIconicParamCount() const;
  345. int GetOutputIconicParamCount() const;
  346. int GetInputCtrlParamCount() const;
  347. int GetOutputCtrlParamCount() const;
  348. // Get name of input/output object/control parameters
  349. // (indices of the parameters run from 1 to count)
  350. const char* GetInputIconicParamName(int par_idx) const;
  351. const char* GetOutputIconicParamName(int par_idx) const;
  352. const char* GetInputCtrlParamName(int par_idx) const;
  353. const char* GetOutputCtrlParamName(int par_idx) const;
  354. // Get dimension of input/output object/control parameters
  355. // (indices of the parameters run from 1 to count)
  356. int GetInputIconicParamDimension(int par_idx) const;
  357. int GetOutputIconicParamDimension(int par_idx) const;
  358. int GetInputCtrlParamDimension(int par_idx) const;
  359. int GetOutputCtrlParamDimension(int par_idx) const;
  360. // Get info of procedure documentation
  361. HalconCpp::HTuple GetInfo(const char* slot) const;
  362. // Get info of parameter documentation by name
  363. HalconCpp::HTuple GetParamInfo(const char* par_name, const char* slot) const;
  364. // Get info of parameter documentation by index
  365. // (indices of the parameters run from 1 to count)
  366. HalconCpp::HTuple GetInputIconicParamInfo(int par_idx, const char* slot) const;
  367. HalconCpp::HTuple GetOutputIconicParamInfo(int par_idx, const char* slot) const;
  368. HalconCpp::HTuple GetInputCtrlParamInfo(int par_idx, const char* slot) const;
  369. HalconCpp::HTuple GetOutputCtrlParamInfo(int par_idx, const char* slot) const;
  370. // Query possible slots for procedure/parameter info
  371. HalconCpp::HTuple QueryInfo() const;
  372. HalconCpp::HTuple QueryParamInfo() const;
  373. };
  374. /*****************************************************************************
  375. *****************************************************************************
  376. ** class HDevProcedureCall
  377. **===========================================================================
  378. ** Class for executing an HDevelop procedure and managing the parameter
  379. ** values
  380. *****************************************************************************
  381. *****************************************************************************/
  382. class LIntExport HDevProcedureCall
  383. {
  384. HDEV_PD;
  385. public:
  386. // Create an empty HDevelop procedure call instance
  387. HDevProcedureCall();
  388. // Create HDevelop procedure call instance
  389. HDevProcedureCall(const HDevProcedure& hdev_proc);
  390. // Copy constructor
  391. HDevProcedureCall(const HDevProcedureCall& hdev_proc_call);
  392. HDevProcedureCall(const Data& data);
  393. // Assignment operation
  394. HDevProcedureCall& operator=(const HDevProcedureCall& hdev_proc_call);
  395. // Destructor
  396. ~HDevProcedureCall();
  397. // Get the procedure
  398. HDevProcedure GetProcedure() const;
  399. // Execute program
  400. void Execute();
  401. // Stop execution on first line of procedure. This is intended for debugging
  402. // purposes when you wish to step through a specific procedure call. It only
  403. // has an effect when a debug server is running and it will only stop once.
  404. void SetWaitForDebugConnection(bool wait_once);
  405. // Clear procedure and reset callstack
  406. // - this method stops the execution of the procedure after the current
  407. // program line
  408. void Reset();
  409. // Set input object/control parameter
  410. void SetInputIconicParamObject(int par_idx, const HalconCpp::HObject& obj);
  411. void SetInputIconicParamObject(const char* par_name, const HalconCpp::HObject& obj);
  412. void SetInputIconicParamVector(int par_idx, const HalconCpp::HObjectVector& vector);
  413. void SetInputIconicParamVector(const char* par_name, const HalconCpp::HObjectVector& vector);
  414. void SetInputCtrlParamTuple(int par_idx, const HalconCpp::HTuple& tuple);
  415. void SetInputCtrlParamTuple(const char* par_name, const HalconCpp::HTuple& tuple);
  416. void SetInputCtrlParamVector(int par_idx, const HalconCpp::HTupleVector& vector);
  417. void SetInputCtrlParamVector(const char* par_name, const HalconCpp::HTupleVector& vector);
  418. // Get the objects / values of the parameters by name or by index
  419. // (indices of the variables run from 1 to count)
  420. HalconCpp::HObject GetOutputIconicParamObject(int par_idx) const;
  421. HalconCpp::HObject GetOutputIconicParamObject(const char* par_name) const;
  422. HalconCpp::HObjectVector GetOutputIconicParamVector(int par_idx) const;
  423. HalconCpp::HObjectVector GetOutputIconicParamVector(const char* par_name) const;
  424. HalconCpp::HTuple GetOutputCtrlParamTuple(int par_idx) const;
  425. HalconCpp::HTuple GetOutputCtrlParamTuple(const char* par_name) const;
  426. HalconCpp::HTupleVector GetOutputCtrlParamVector(int par_idx) const;
  427. HalconCpp::HTupleVector GetOutputCtrlParamVector(const char* par_name) const;
  428. // These methods are provided for efficiency:
  429. // the results are copied directly into the tuple variable provided by
  430. // the user without additional copying
  431. void GetOutputCtrlParamTuple(int par_idx, HalconCpp::HTuple* tuple) const;
  432. void GetOutputCtrlParamTuple(const char* par_name, HalconCpp::HTuple* tuple) const;
  433. };
  434. /*****************************************************************************
  435. *****************************************************************************
  436. ** class HDevEngineException
  437. **===========================================================================
  438. ** Class for HDevelop engine exceptions
  439. *****************************************************************************
  440. *****************************************************************************/
  441. class LIntExport HDevEngineException
  442. {
  443. HDEV_PD;
  444. public:
  445. // Exception categories
  446. enum ExceptionCategory
  447. {
  448. Exception, // Generic
  449. ExceptionInpNotInit, // Error input parameters not initialized
  450. ExceptionCall, // Error HALCON or HDevelop operator call
  451. ExceptionFile // Error opening or reading HDevelop file
  452. };
  453. // Create HDevelop engine exception
  454. HDevEngineException(const char* message, ExceptionCategory category = Exception, const char* exec_proc_name = "",
  455. int prog_line_num = -1, const char* prog_line_name = "", Herror h_err_nr = H_MSG_VOID,
  456. const HalconCpp::HTuple& user_data = HalconCpp::HTuple());
  457. HDevEngineException(const HDevEngineException& exc);
  458. HDevEngineException(const Data& data);
  459. HDevEngineException& operator=(const HDevEngineException& exc);
  460. virtual ~HDevEngineException();
  461. // Error text
  462. const char* Message() const;
  463. // Category of exception
  464. ExceptionCategory Category() const;
  465. const char* CategoryText() const;
  466. // Name of executed procedure
  467. const char* ExecProcedureName() const;
  468. // Number of executed procedure or operator program line
  469. int ProgLineNum() const;
  470. // Name of executed procedure or operator program line
  471. const char* ProgLineName() const;
  472. // HALCON error code
  473. Herror HalconErrorCode() const;
  474. HDEPRECATED(Herror HalconErrNum() const, "deprecated, please use HalconErrorCode instead.");
  475. HalconCpp::HTuple UserData() const;
  476. void UserData(HalconCpp::HTuple& user_Data) const;
  477. };
  478. /*****************************************************************************
  479. *****************************************************************************
  480. ** class HDevOperatorImplCpp
  481. **===========================================================================
  482. ** Class for the implemention of HDevelop internal operators
  483. *****************************************************************************
  484. *****************************************************************************/
  485. class LIntExport HDevOperatorImplCpp
  486. {
  487. HDEV_PD;
  488. public:
  489. HDevOperatorImplCpp();
  490. // Copy constructor
  491. HDevOperatorImplCpp(const HDevOperatorImplCpp& hdev_op_impl);
  492. HDevOperatorImplCpp(const Data& data);
  493. // Assignment operation
  494. HDevOperatorImplCpp& operator=(const HDevOperatorImplCpp& hdev_op_impl);
  495. // Destructor
  496. virtual ~HDevOperatorImplCpp();
  497. virtual int DevClearWindow();
  498. virtual int DevCloseWindow();
  499. virtual int DevSetWindow(const HalconCpp::HTuple& win_id);
  500. virtual int DevGetWindow(HalconCpp::HTuple* win_id);
  501. virtual int DevDisplay(const HalconCpp::HObject& obj);
  502. virtual int DevDispText(const HalconCpp::HTuple& string, const HalconCpp::HTuple& coordSystem,
  503. const HalconCpp::HTuple& row, const HalconCpp::HTuple& column,
  504. const HalconCpp::HTuple& color, const HalconCpp::HTuple& genParamName,
  505. const HalconCpp::HTuple& genParamValue);
  506. virtual int DevSetWindowExtents(const HalconCpp::HTuple& row, const HalconCpp::HTuple& col,
  507. const HalconCpp::HTuple& width, const HalconCpp::HTuple& height);
  508. virtual int DevSetDraw(const HalconCpp::HTuple& draw);
  509. virtual int DevSetContourStyle(const HalconCpp::HTuple& style);
  510. virtual int DevSetShape(const HalconCpp::HTuple& shape);
  511. virtual int DevSetColored(const HalconCpp::HTuple& colored);
  512. virtual int DevSetColor(const HalconCpp::HTuple& color);
  513. virtual int DevSetLut(const HalconCpp::HTuple& lut);
  514. virtual int DevSetPaint(const HalconCpp::HTuple& paint);
  515. virtual int DevSetPart(const HalconCpp::HTuple& row1, const HalconCpp::HTuple& col1, const HalconCpp::HTuple& row2,
  516. const HalconCpp::HTuple& col2);
  517. virtual int DevSetLineWidth(const HalconCpp::HTuple& width);
  518. virtual int DevOpenWindow(const HalconCpp::HTuple& row, const HalconCpp::HTuple& col, const HalconCpp::HTuple& width,
  519. const HalconCpp::HTuple& height, const HalconCpp::HTuple& background,
  520. HalconCpp::HTuple* win_id);
  521. };
  522. } // namespace HDevEngineCpp
  523. #endif // #ifndef H_DEV_ENGINE_CPP_H