aboutsummaryrefslogtreecommitdiff
path: root/src/old/pqueue.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-02-11 05:29:41 +0000
committerMike Buland <eichlan@xagasoft.com>2009-02-11 05:29:41 +0000
commitf4b191f0ea396b58465bfba40749977780a3af58 (patch)
tree891490e91ab3b67524be67b2b71c85d84fd2f92a /src/old/pqueue.h
parent292ae9453e7fdb2f1023ed9dfc99cbcd751f8b90 (diff)
downloadlibbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.gz
libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.bz2
libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.xz
libbu++-f4b191f0ea396b58465bfba40749977780a3af58.zip
Just removing some things that are cluttering up the source tree.
Diffstat (limited to '')
-rw-r--r--src/old/pqueue.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/old/pqueue.h b/src/old/pqueue.h
deleted file mode 100644
index 8307d56..0000000
--- a/src/old/pqueue.h
+++ /dev/null
@@ -1,48 +0,0 @@
1#ifndef PQUEUE_H
2#define PQUEUE_H
3
4#include "queue.h"
5
6/** Priority queue. This is just like a queue, but something with a higher
7 * priority will always come off the queue before something with a lower
8 * priority, even if it's added after. Otherwise works just like a queue.
9 *@author Mike Buland
10 */
11class PQueue
12{
13public:
14 /** Create a queue with any number of different priorities.
15 *@param nNewNumQueues The number of queues, the default is 3
16 */
17 PQueue( int nNewNumQueues=3 );
18
19 /**
20 * Cleanup all contained queues.
21 */
22 virtual ~PQueue();
23
24 /** Add a new item to the queue at the specified priority. A lower
25 * number means a higher priority!
26 *@param pData A pointer to the data to add to the queue
27 *@param nQueueLevel The priority to set the new data to
28 */
29 void enqueue( void *pData, int nQueueLevel );
30
31 /** Pull the next item off the queue, high priority first.
32 *@returns A pointer to the data that was next in the priority queue
33 */
34 void *dequeue();
35
36private:
37 /**
38 * The queues we use for real data storage.
39 */
40 Queue *aQueue;
41
42 /**
43 * The number of priorities or queus that we need.
44 */
45 int nNumQueues;
46};
47
48#endif