-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQueue.h
69 lines (60 loc) · 1007 Bytes
/
Queue.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Queue.h
*
* Created on: Oct 25, 2013
* Author: subhranil
*/
#include<stddef.h>
#include<stdlib.h>
#ifndef QUEUE_H_
#define QUEUE_H_
struct task;
typedef struct Node
{
void* data;
struct Node* next;
} Node;
//class Queue {
//protected:
//
// Node *mHead;
// Node *mTail;
// int mNumberOfElements;
//public:
// Queue();
// virtual ~Queue();
// Node* start();
// bool isEmpty();
// virtual void enQueue(void*);
// Node *deQueue();
// static Node* iterate(Node* head);
//
//};
//
//
//
//class PriorityQueue: public Queue
//{
//public:
// PriorityQueue();
// void enQueue(void* task);
//};
typedef struct Queue
{
Node *mHead;
Node *mTail;
int mNumberOfElements;
//public:
// Queue();
// virtual ~Queue();
// Node* start();
// bool isEmpty();
// virtual void enQueue(void*);
// Node *deQueue();
// static Node* iterate(Node* head);
} Queue;
Queue* initialiseQueue();
void enQueue(Queue*,void*);
Node* deQueue(Queue*);
//static Node* iterate(Queue,Node* head);
#endif /* QUEUE_H_ */