blob: 4571272b3b7f4daea7f6b9c7beae034f3039a004 (
plain) (
tree)
|
|
#pragma once
template<class T>
class cDeleter
{
public:
static void Delete(T) {};
};
template<class T, class D = cDeleter<T>>
class cQueue
{
public:
cQueue(int warnsize);
cQueue(cQueue<T>& 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<T> contents;
};
//template classes must be implemented in the header
#include "Queue.inc"
|