HDevEngineCpp.h 27 KB

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