blob: 838a101e040a27908f6821079fb3e85ba5fb9ca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
template<class T>
class cDeleter
{
public:
static void Delete(T) {};
}
template<class T, class D = cDelete>
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;
}
//template classes must be implemented in the header
#include "Queue.inc"
|