akmhoque | 79d355f | 2014-02-04 15:11:16 -0600 | [diff] [blame^] | 1 | #ifndef NLSR_RTC_HPP |
| 2 | #define NLSR_RTC_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include <iostream> |
| 6 | |
| 7 | |
| 8 | |
| 9 | class Map; |
| 10 | class RoutingTable; |
| 11 | class nlsr; |
| 12 | |
| 13 | |
| 14 | using namespace std; |
| 15 | |
| 16 | class RoutingTableCalculator |
| 17 | { |
| 18 | public: |
| 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 | |
| 31 | protected: |
| 32 | double ** adjMatrix; |
| 33 | int numOfRouter; |
| 34 | }; |
| 35 | |
| 36 | class LinkStateRoutingTableCalculator: public RoutingTableCalculator |
| 37 | { |
| 38 | public: |
| 39 | LinkStateRoutingTableCalculator(int rn) |
| 40 | { |
| 41 | numOfRouter=rn; |
| 42 | } |
| 43 | |
| 44 | void calculatePath(Map& pMap, RoutingTable& rt, nlsr& pnlsr); |
| 45 | |
| 46 | }; |
| 47 | |
| 48 | class HypRoutingTableCalculator: public RoutingTableCalculator |
| 49 | { |
| 50 | public: |
| 51 | HypRoutingTableCalculator(int rn) |
| 52 | { |
| 53 | numOfRouter=rn; |
| 54 | } |
| 55 | |
| 56 | void calculatePath(Map& pMap, RoutingTable& rt, nlsr& pnlsr); |
| 57 | |
| 58 | }; |
| 59 | |
| 60 | class 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 |