Go to the source code of this file.
Classes | |
class | XnThreadSafeQueue |
Defines | |
#define | XN_DECLARE_THREAD_SAFE_QUEUE(Type, ClassName) XN_DECLARE_THREAD_SAFE_QUEUE_DECL(, Type, ClassName) |
#define | XN_DECLARE_THREAD_SAFE_QUEUE_DECL(decl, Type, ClassName) |
#define | XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR(Type, ClassName, Translator) XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR_DECL(, Type, ClassName, Translator) |
#define | XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR_DECL(decl, Type, ClassName, Translator) |
#define XN_DECLARE_THREAD_SAFE_QUEUE | ( | Type, | |
ClassName | |||
) | XN_DECLARE_THREAD_SAFE_QUEUE_DECL(, Type, ClassName) |
Declares a thread safe queue of type Type, named ClassName, that uses the default translator.
Definition at line 155 of file XnThreadSafeQueue.h.
#define XN_DECLARE_THREAD_SAFE_QUEUE_DECL | ( | decl, | |
Type, | |||
ClassName | |||
) |
XN_DECLARE_DEFAULT_VALUE_TRANSLATOR_DECL(decl, Type, XN_DEFAULT_TRANSLATOR_NAME(ClassName)) \ XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR_DECL(decl, Type, ClassName, XN_DEFAULT_TRANSLATOR_NAME(ClassName))
Declares a thread safe queue of type Type, named ClassName, that uses the default translator. It is declared using the declspec decl.
Definition at line 148 of file XnThreadSafeQueue.h.
#define XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR | ( | Type, | |
ClassName, | |||
Translator | |||
) | XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR_DECL(, Type, ClassName, Translator) |
Declares a thread safe queue of type Type, named ClassName. The class uses Translator for translating from Type to XnValue. It inherits from base. Note that base must be a derivative of XnQueue.
Definition at line 141 of file XnThreadSafeQueue.h.
#define XN_DECLARE_THREAD_SAFE_QUEUE_WITH_TRANSLATOR_DECL | ( | decl, | |
Type, | |||
ClassName, | |||
Translator | |||
) |
class decl ClassName : public XnThreadSafeQueue \ { \ public: \ ~ClassName() \ { \ /* We do this using Pop() to make sure memory is freed. */ \ Type dummy; \ while (Size() != 0) \ Pop(dummy); \ } \ XnStatus Push(Type const& value) \ { \ XnValue val = Translator::CreateValueCopy(value); \ XnStatus nRetVal = XnThreadSafeQueue::Push(val); \ if (nRetVal != XN_STATUS_OK) \ { \ Translator::FreeValue(val); \ return (nRetVal); \ } \ return XN_STATUS_OK; \ } \ XnStatus Pop(Type& value) \ { \ XnValue val; \ XnStatus nRetVal = XnThreadSafeQueue::Pop(val); \ if (nRetVal != XN_STATUS_OK) return (nRetVal); \ value = Translator::GetFromValue(val); \ return XN_STATUS_OK; \ } \ };
Declares a thread safe queue of type Type, named ClassName. The class uses Translator for translating from Type to XnValue. It is declared using the declspec decl. It inherits from base. Note that base must be a derivative of XnQueue.
Definition at line 104 of file XnThreadSafeQueue.h.