-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpriorityQueueLL.h
More file actions
58 lines (45 loc) · 953 Bytes
/
priorityQueueLL.h
File metadata and controls
58 lines (45 loc) · 953 Bytes
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
#ifndef PRIORITYQUEUELL_H
#define PRIORITYQUEUELL_H
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct patientLL
{
struct patientLL *next = NULL;
struct patientLL *prev = NULL;
//what is next, what was last
string name;
int priority;
int treatment;
//3 atributes of the struct
patientLL(){};
//default constructor
patientLL(string pName, int pri, int tre, patientLL *initNext, patientLL *initPrev)
{
name = pName;
priority = pri;
treatment = tre;
next = initNext;
prev = initPrev;
}
//intialize patient nodes
};
class priorityQueueLL
{
public:
priorityQueueLL();
~priorityQueueLL();
//constructor, deconstructor
void push(string, int, int);
//push a new patient struct in, already made
void pop();
//pops the top item
patientLL* top();
//returns the top item
protected:
private:
int comparePatient(patientLL * p_a, patientLL * p_b);
patientLL *head;
};
#endif