blob: 5b5cc3bc1a19275bef45fc13470a5dc709d2acb1 [file] [log] [blame]
akmhoque79d355f2014-02-04 15:11:16 -06001#ifndef NLSR_RTC_HPP
2#define NLSR_RTC_HPP
3
4#include <list>
5#include <iostream>
6
7
8
9class Map;
10class RoutingTable;
11class nlsr;
12
13
14using namespace std;
15
16class RoutingTableCalculator
17{
18public:
19 RoutingTableCalculator()
20 {
21 }
22 RoutingTableCalculator(int rn)
23 {
24 numOfRouter=rn;
25 }
26
27 void allocateAdjMatrix();
28 void makeAdjMatrix(nlsr& pnlsr,Map pMap);
29 void freeAdjMatrix();
30
31protected:
32 double ** adjMatrix;
33 int numOfRouter;
34};
35
36class LinkStateRoutingTableCalculator: public RoutingTableCalculator
37{
38public:
39 LinkStateRoutingTableCalculator(int rn)
40 {
41 numOfRouter=rn;
42 }
43
44 void calculatePath(Map& pMap, RoutingTable& rt, nlsr& pnlsr);
45
46};
47
48class HypRoutingTableCalculator: public RoutingTableCalculator
49{
50public:
51 HypRoutingTableCalculator(int rn)
52 {
53 numOfRouter=rn;
54 }
55
56 void calculatePath(Map& pMap, RoutingTable& rt, nlsr& pnlsr);
57
58};
59
60class HypDryRoutingTableCalculator: public RoutingTableCalculator
61{
62 public:
63 HypDryRoutingTableCalculator(int rn)
64 {
65 numOfRouter=rn;
66 }
67
68 void calculatePath(Map& pMap, RoutingTable& rt, nlsr& pnlsr);
69
70};
71
72#endif