123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HCOMPUTEDEVICE
- #define HCPP_HCOMPUTEDEVICE
- namespace HalconCpp
- {
- // Class representing a compute device handle.
- class LIntExport HComputeDevice : public HHandle
- {
- public:
- // Create an uninitialized instance
- HComputeDevice():HHandle() {}
- // Copy constructor
- HComputeDevice(const HComputeDevice& source) : HHandle(source) {}
- // Copy constructor
- HComputeDevice(const HHandle& handle);
- bool operator==(const HHandle& obj) const
- {
- return HHandleBase::operator==(obj);
- }
- bool operator!=(const HHandle& obj) const
- {
- return HHandleBase::operator!=(obj);
- }
- protected:
- // Verify matching semantic type ('compute_device')!
- virtual void AssertType(Hphandle handle) const;
- public:
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // open_compute_device: Open a compute device.
- explicit HComputeDevice(Hlong DeviceIdentifier);
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Query compute device parameters.
- HTuple GetComputeDeviceParam(const HString& GenParamName) const;
- // Query compute device parameters.
- HTuple GetComputeDeviceParam(const char* GenParamName) const;
- #ifdef _WIN32
- // Query compute device parameters.
- HTuple GetComputeDeviceParam(const wchar_t* GenParamName) const;
- #endif
- // Set parameters of an compute device.
- void SetComputeDeviceParam(const HString& GenParamName, const HTuple& GenParamValue) const;
- // Set parameters of an compute device.
- void SetComputeDeviceParam(const HString& GenParamName, const HString& GenParamValue) const;
- // Set parameters of an compute device.
- void SetComputeDeviceParam(const char* GenParamName, const char* GenParamValue) const;
- #ifdef _WIN32
- // Set parameters of an compute device.
- void SetComputeDeviceParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
- #endif
- // Close all compute devices.
- static void ReleaseAllComputeDevices();
- // Close a compute_device.
- void ReleaseComputeDevice() const;
- // Deactivate all compute devices.
- static void DeactivateAllComputeDevices();
- // Deactivate a compute device.
- void DeactivateComputeDevice() const;
- // Activate a compute device.
- void ActivateComputeDevice() const;
- // Initialize a compute device.
- void InitComputeDevice(const HTuple& Operators) const;
- // Open a compute device.
- void OpenComputeDevice(Hlong DeviceIdentifier);
- // Get information on a compute device.
- static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const HString& InfoName);
- // Get information on a compute device.
- static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const char* InfoName);
- #ifdef _WIN32
- // Get information on a compute device.
- static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const wchar_t* InfoName);
- #endif
- // Get the list of available compute devices.
- static HTuple QueryAvailableComputeDevices();
- };
- // forward declarations and types for internal array implementation
- template<class T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HComputeDevice> HComputeDeviceArrayRef;
- typedef HSmartPtr< HComputeDeviceArrayRef > HComputeDeviceArrayPtr;
- // Represents multiple tool instances
- class LIntExport HComputeDeviceArray : public HHandleBaseArray
- {
- public:
- // Create empty array
- HComputeDeviceArray();
- // Create array from native array of tool instances
- HComputeDeviceArray(HComputeDevice* classes, Hlong length);
- // Copy constructor
- HComputeDeviceArray(const HComputeDeviceArray &tool_array);
- // Destructor
- virtual ~HComputeDeviceArray();
- // Assignment operator
- HComputeDeviceArray &operator=(const HComputeDeviceArray &tool_array);
- // Clears array and all tool instances
- virtual void Clear();
- // Get array of native tool instances
- const HComputeDevice* Tools() const;
- // Get number of tools
- virtual Hlong Length() const;
- // Create tool array from tuple of handles
- virtual void SetFromTuple(const HTuple& handles);
- // Get tuple of handles for tool array
- virtual HTuple ConvertToTuple() const;
- protected:
- // Smart pointer to internal data container
- HComputeDeviceArrayPtr *mArrayPtr;
- };
- }
- #endif
|