/*********************************************************** * 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 HSmartPtr; template class HHandleBaseArrayRef; typedef HHandleBaseArrayRef 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