143 lines
3.7 KiB
C++
143 lines
3.7 KiB
C++
/***********************************************************
|
|
* File generated by the HALCON-Compiler hcomp version 18.05
|
|
* Usage: Interface to C++
|
|
*
|
|
* Software by: MVTec Software GmbH, www.mvtec.com
|
|
***********************************************************/
|
|
|
|
|
|
#ifndef HCPP_HBARRIER
|
|
#define HCPP_HBARRIER
|
|
|
|
namespace HalconCpp
|
|
{
|
|
|
|
// Represents an instance of a barrier synchronization object.
|
|
class LIntExport HBarrier : public HHandle
|
|
{
|
|
|
|
public:
|
|
|
|
// Create an uninitialized instance
|
|
HBarrier():HHandle() {}
|
|
|
|
// Copy constructor
|
|
HBarrier(const HBarrier& source) : HHandle(source) {}
|
|
|
|
// Copy constructor
|
|
HBarrier(const HHandle& handle);
|
|
|
|
// Create HBarrier from handle, taking ownership
|
|
explicit HBarrier(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 ('barrier')!
|
|
virtual void AssertType(Hphandle handle) const;
|
|
|
|
public:
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
* Operator-based class constructors
|
|
*****************************************************************************/
|
|
|
|
// create_barrier: Create a barrier synchronization object.
|
|
explicit HBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize);
|
|
|
|
// create_barrier: Create a barrier synchronization object.
|
|
explicit HBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize);
|
|
|
|
// create_barrier: Create a barrier synchronization object.
|
|
explicit HBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize);
|
|
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
* Operators *
|
|
***************************************************************************/
|
|
|
|
// Destroy a barrier synchronization object.
|
|
void ClearBarrier() const;
|
|
|
|
// Wait on the release of a barrier synchronization object.
|
|
void WaitBarrier() const;
|
|
|
|
// Create a barrier synchronization object.
|
|
void CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize);
|
|
|
|
// Create a barrier synchronization object.
|
|
void CreateBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize);
|
|
|
|
// Create a barrier synchronization object.
|
|
void CreateBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize);
|
|
|
|
};
|
|
|
|
// forward declarations and types for internal array implementation
|
|
|
|
template<class T> class HSmartPtr;
|
|
template<class T> class HHandleBaseArrayRef;
|
|
|
|
typedef HHandleBaseArrayRef<HBarrier> HBarrierArrayRef;
|
|
typedef HSmartPtr< HBarrierArrayRef > HBarrierArrayPtr;
|
|
|
|
|
|
// Represents multiple tool instances
|
|
class LIntExport HBarrierArray : public HHandleBaseArray
|
|
{
|
|
|
|
public:
|
|
|
|
// Create empty array
|
|
HBarrierArray();
|
|
|
|
// Create array from native array of tool instances
|
|
HBarrierArray(HBarrier* classes, Hlong length);
|
|
|
|
// Copy constructor
|
|
HBarrierArray(const HBarrierArray &tool_array);
|
|
|
|
// Destructor
|
|
virtual ~HBarrierArray();
|
|
|
|
// Assignment operator
|
|
HBarrierArray &operator=(const HBarrierArray &tool_array);
|
|
|
|
// Clears array and all tool instances
|
|
virtual void Clear();
|
|
|
|
// Get array of native tool instances
|
|
const HBarrier* 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
|
|
HBarrierArrayPtr *mArrayPtr;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|