forked from shahpoojan/NetSim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropTailQueue.h
More file actions
33 lines (23 loc) · 764 Bytes
/
Copy pathDropTailQueue.h
File metadata and controls
33 lines (23 loc) · 764 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
// Definition of DropTail Queue class
// ECE8893, Final Project, Fall 2012
#include "Queue.h"
#ifndef __DROP_TAIL_QUEUE_H__
#define __DROP_TAIL_QUEUE_H__
#include <list>
using namespace std;
class DropTailQueue : public Queue
{
public:
//DropTailQueue();
DropTailQueue(int maxLth); // Create with specified maximum length (packets)
//virtual bool Enque(Packet*); // Add a packet to the queue, true if successful
//virtual Packet* Deque(); // Remove a packet from the queue
bool Enque(Packet*); // Add a packet to the queue, true if successful
Packet* Deque(); // Remove a packet from the queue
private:
list<Packet*> PacketQueue;
int max_length;
int length;
// define the actual queue here (deque or vector?)
};
#endif