-
Notifications
You must be signed in to change notification settings - Fork 6
/
link.h
44 lines (30 loc) · 892 Bytes
/
link.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
#ifndef _link
#define _link
#include <new>
#include <iostream>
using namespace std;
class SimulationContext;
class Link {
unsigned src,dest;
SimulationContext *context;
double bw;
double lat;
public:
Link(const unsigned s, const unsigned d, SimulationContext *c, double b, double l);
Link();
Link(const Link &rhs);
Link & operator=(const Link &rhs);
virtual ~Link();
virtual bool Matches(const Link &rhs) const;
virtual void SetSrc(const unsigned s);
virtual unsigned GetSrc() const;
virtual void SetDest(const unsigned d);
virtual unsigned GetDest() const;
virtual void SetLatency(const double l);
virtual double GetLatency() const;
virtual void SetBW(const double b);
virtual double GetBW() const;
virtual ostream & Print(ostream &os) const;
};
inline ostream & operator<<(ostream &os, const Link &n) { return n.Print(os);}
#endif