queue.h
rogue25b2/src/queue.h · 1.2 KB
From the archive rogue2.5b2FIXED.tar.gz
Download the archive « Back to the archive contents
/***************************************************************************\
[*] ___ ____ ____ __ __ ____ [*] ROGUE: ROM With Attitude [*]
[*] /#/ ) /#/ ) /#/ ) /#/ /#/ /#/ [*] All rights reserved [*]
[*] /#/ < /#/ / /#/ _ /#/ /#/ /#/-- [*] Copyright(C) 2000-2001 [*]
[*] /#/ \(#(__/ (#(__/ (#(__/#/ (#(___ [*] Kenneth Conley (Mendanbar) [*]
[*] Expression of Digital Creativity.. [*] roguemud@yahoogroups.com [*]
[-]---------------------------------------+-+-----------------------------[-]
[*] File: queue.h [*]
[*] Usage: Primary queue controls [*]
\***************************************************************************/
#ifndef __QUEUE_H__
#define __QUEUE_H__
#include "types.h"
#define NUM_EVENT_QUEUES 10
class QueueElement {
public:
QueueElement(Ptr data, SInt32 key);
Ptr data;
SInt32 key;
QueueElement *prev, *next;
};
class Queue {
public:
Queue(void);
~Queue(void);
QueueElement * Enqueue(Ptr data, SInt32 key);
void Dequeue(QueueElement *qe);
Ptr QueueHead(void);
SInt32 QueueKey(void);
QueueElement *head[NUM_EVENT_QUEUES], *tail[NUM_EVENT_QUEUES];
};
#endif