123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HMUTEX
- #define HCPP_HMUTEX
- namespace HalconCpp
- {
- // Represents an instance of a mutex synchronization object.
- class LIntExport HMutex : public HHandle
- {
- public:
- // Create an uninitialized instance
- HMutex():HHandle() {}
- // Copy constructor
- HMutex(const HMutex& source) : HHandle(source) {}
- // Copy constructor
- HMutex(const HHandle& handle);
- // Create HMutex from handle, taking ownership
- explicit HMutex(Hlong 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 ('mutex')!
- virtual void AssertType(Hphandle handle) const;
- public:
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // create_mutex: Create a mutual exclusion synchronization object.
- explicit HMutex(const HTuple& AttribName, const HTuple& AttribValue);
- // create_mutex: Create a mutual exclusion synchronization object.
- explicit HMutex(const HString& AttribName, const HString& AttribValue);
- // create_mutex: Create a mutual exclusion synchronization object.
- explicit HMutex(const char* AttribName, const char* AttribValue);
- #ifdef _WIN32
- // create_mutex: Create a mutual exclusion synchronization object.
- explicit HMutex(const wchar_t* AttribName, const wchar_t* AttribValue);
- #endif
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Clear the mutex synchronization object.
- void ClearMutex() const;
- // Unlock a mutex synchronization object.
- void UnlockMutex() const;
- // Lock a mutex synchronization object.
- Hlong TryLockMutex() const;
- // Lock a mutex synchronization object.
- void LockMutex() const;
- // Create a mutual exclusion synchronization object.
- void CreateMutex(const HTuple& AttribName, const HTuple& AttribValue);
- // Create a mutual exclusion synchronization object.
- void CreateMutex(const HString& AttribName, const HString& AttribValue);
- // Create a mutual exclusion synchronization object.
- void CreateMutex(const char* AttribName, const char* AttribValue);
- #ifdef _WIN32
- // Create a mutual exclusion synchronization object.
- void CreateMutex(const wchar_t* AttribName, const wchar_t* AttribValue);
- #endif
- };
- // forward declarations and types for internal array implementation
- template<class T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HMutex> HMutexArrayRef;
- typedef HSmartPtr< HMutexArrayRef > HMutexArrayPtr;
- // Represents multiple tool instances
- class LIntExport HMutexArray : public HHandleBaseArray
- {
- public:
- // Create empty array
- HMutexArray();
- // Create array from native array of tool instances
- HMutexArray(HMutex* classes, Hlong length);
- // Copy constructor
- HMutexArray(const HMutexArray &tool_array);
- // Destructor
- virtual ~HMutexArray();
- // Assignment operator
- HMutexArray &operator=(const HMutexArray &tool_array);
- // Clears array and all tool instances
- virtual void Clear();
- // Get array of native tool instances
- const HMutex* 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
- HMutexArrayPtr *mArrayPtr;
- };
- }
- #endif
|