akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 1 | #ifndef NLSR_NPTE_HPP |
| 2 | #define NLSR_NPTE_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include <utility> |
| 6 | #include "nlsr_rte.hpp" |
| 7 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame^] | 8 | namespace nlsr { |
| 9 | |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 10 | using namespace std; |
| 11 | |
| 12 | class Npte |
| 13 | { |
| 14 | public: |
| 15 | Npte() |
| 16 | : namePrefix() |
| 17 | , nhl() |
| 18 | { |
| 19 | } |
| 20 | Npte(string np) |
| 21 | : nhl() |
| 22 | { |
| 23 | namePrefix=np; |
| 24 | } |
| 25 | |
| 26 | string getNamePrefix() |
| 27 | { |
| 28 | return namePrefix; |
| 29 | } |
| 30 | |
| 31 | std::list<RoutingTableEntry>& getRteList() |
| 32 | { |
| 33 | return rteList; |
| 34 | } |
| 35 | |
| 36 | int getRteListSize() |
| 37 | { |
| 38 | return rteList.size(); |
| 39 | } |
| 40 | |
| 41 | Nhl& getNhl() |
| 42 | { |
| 43 | return nhl; |
| 44 | } |
| 45 | void generateNhlfromRteList(); |
| 46 | void removeRoutingTableEntry(RoutingTableEntry& rte); |
| 47 | void addRoutingTableEntry(RoutingTableEntry &rte); |
| 48 | |
| 49 | private: |
| 50 | string namePrefix; |
| 51 | std::list<RoutingTableEntry> rteList; |
| 52 | Nhl nhl; |
| 53 | }; |
| 54 | |
| 55 | ostream& |
| 56 | operator<<(ostream& os, Npte& npte); |
| 57 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame^] | 58 | }//namespace nlsr |
| 59 | |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 60 | #endif |