19 namespace artec {
namespace sdk {
namespace base
59 template <
class T>
class TRef
91 operator bool()
const {
return tObject_ != NULL; }
111 tmpObject->release();
126 tmpObject->release();
135 void* addressP =
reinterpret_cast<void*
>(&
const_cast<char&
>(
reinterpret_cast<const volatile char&
>(p)));
137 if (
this != addressP)
152 ABASESDK_ERROR(L
"Please release your TRef before using operator&");
void attach(T *p)
Attach to the interface pointer without calling addref() for it.
#define ABASESDK_ERROR(...)
TRef< T > & operator=(T *p)
TRef< T > & operator=(TRef< T > &&p)
Move operator.
bool operator==(T *p) const
This class is intended for safe manipulation of supported classes in terms of their time frame...
const T & operator*() const
T * detach()
Detach the interface pointer without calling release() for it.
bool operator!=(T *p) const
TRef< T > & operator=(const TRef< T > &p)