-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.cpp
42 lines (34 loc) · 873 Bytes
/
link.cpp
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
#include "link.h"
Link::Link()
{
}
Link::Link(int link_id, int sdid, int ddid, float b)
{
this->id = link_id;
this->s_domain_id = sdid;
this->d_domain_id = ddid;
this->bandwidth = b;
}
pair<int, int> Link::get_domain_pair()
{
pair<int,int> domain_pair;
domain_pair.first = this->s_domain_id;
domain_pair.second = this->d_domain_id;
return domain_pair;
}
float Link::get_bandwidth()
{
return this->bandwidth;
}
int Link::get_link_id()
{
return this->id;
}
void Link::get_link_info()
{
cout << "---Short info about This Link " << endl;
cout << "Link id = " << this->id << endl;
cout << "Link source domain id = " << this->s_domain_id << endl;
cout << "Link destination domain id = " << this->d_domain_id << endl;
cout << "Link bandwidth value = " << this->bandwidth << endl;
}