From a71299c46b7b53a5f9f11ea2851f8e5b66d2d912 Mon Sep 17 00:00:00 2001 From: Tycho Bickerstaff Date: Sun, 22 Dec 2013 15:41:01 +0000 Subject: fixed rdynamic as its not acctually needed a cmake handles it, looks like the problem was caused by the linux linker accepting the option twice and the os x linker not --- src/OSSupport/Queue.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/OSSupport/Queue.h (limited to 'src/OSSupport/Queue.h') diff --git a/src/OSSupport/Queue.h b/src/OSSupport/Queue.h new file mode 100644 index 000000000..4571272b3 --- /dev/null +++ b/src/OSSupport/Queue.h @@ -0,0 +1,31 @@ +#pragma once + +template +class cDeleter +{ + public: + static void Delete(T) {}; +}; + +template> +class cQueue +{ +public: + cQueue(int warnsize); + cQueue(cQueue& queue); + ~cQueue(); + + void EnqueueItem(T item); + bool TryDequeueItem(T& item); + T DequeueItem(); + void BlockTillEmpty(cEvent CancelationEvent); + void Clear(); + int Size(); + +private: + int warnsize; + std::list contents; +}; + +//template classes must be implemented in the header +#include "Queue.inc" -- cgit v1.2.3