diff options
Diffstat (limited to 'tests/manual/kinectsurface/QtKinectWrapper/OpenNI/Include/XnQueueT.h')
-rw-r--r-- | tests/manual/kinectsurface/QtKinectWrapper/OpenNI/Include/XnQueueT.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/manual/kinectsurface/QtKinectWrapper/OpenNI/Include/XnQueueT.h b/tests/manual/kinectsurface/QtKinectWrapper/OpenNI/Include/XnQueueT.h deleted file mode 100644 index 3320d118..00000000 --- a/tests/manual/kinectsurface/QtKinectWrapper/OpenNI/Include/XnQueueT.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _XN_QUEUE_T_H_ -#define _XN_QUEUE_T_H_ - -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- -#include <XnListT.h> - -//--------------------------------------------------------------------------- -// Code -//--------------------------------------------------------------------------- -template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T> > -class XnQueueT : protected XnListT<T, TAlloc> -{ -public: - typedef XnListT<T, TAlloc> Base; - - XnQueueT() : Base() {} - - XnQueueT(const XnQueueT& other) : Base() - { - *this = other; - } - - XnQueueT& operator=(const XnQueueT& other) - { - Base::operator=(other); - // no other members - return *this; - } - - ~XnQueueT() {} - - using Base::ConstIterator; - using Base::IsEmpty; - - XnStatus Push(T const& value) - { - return Base::AddLast(value); - } - - XnStatus Pop(T& value) - { - Iterator it = Begin(); - if (it == End()) - { - return XN_STATUS_IS_EMPTY; - } - value = *it; - return Base::Remove(it); - } - - T const& Top() const { return *Begin(); } - T& Top() { return *Begin(); } - - using Base::Begin; - using Base::End; - using Base::Size; -}; - - - -#endif // _XN_QUEUE_T_H_
\ No newline at end of file |