[mareframe] Annotation of /trunk/paramin-beta/datastructure.h
Annotation of /trunk/paramin-beta/datastructure.h
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
1 : |
agomez |
1 |
#ifndef datastructure_h
|
2 : |
|
|
#define datastructure_h
|
3 : |
|
|
|
4 : |
|
|
#include "paramin.h" |
5 : |
|
|
|
6 : |
|
|
class Link {
|
7 : |
|
|
public:
|
8 : |
|
|
Link* l;
|
9 : |
|
|
int tid;
|
10 : |
|
|
};
|
11 : |
|
|
|
12 : |
|
|
/**
|
13 : |
|
|
* \class Queue
|
14 : |
|
|
* \brief class Queue stores data items of type integer. Items can be added to the end or front of the queue and removed from the end or the front
|
15 : |
|
|
*/
|
16 : |
|
|
|
17 : |
|
|
class Queue {
|
18 : |
|
|
private:
|
19 : |
|
|
int numberInQueue;
|
20 : |
|
|
Link* first;
|
21 : |
|
|
Link* last;
|
22 : |
|
|
public:
|
23 : |
|
|
Queue();
|
24 : |
|
|
~Queue();
|
25 : |
|
|
void put(int tid);
|
26 : |
|
|
int get();
|
27 : |
|
|
int isEmpty();
|
28 : |
|
|
int getNumItems();
|
29 : |
|
|
int getLast();
|
30 : |
|
|
void putFirst(int dataID);
|
31 : |
|
|
int contains(int id);
|
32 : |
|
|
};
|
33 : |
|
|
|
34 : |
|
|
#endif
|
|