build: == Dependency change == NLSR now depends on ndn-cxx library

Refs: #1535

Change-Id: I4c7c0c3dcfcac6ee91648a46c07e426adbb5bd20
diff --git a/src/route/fib-entry.cpp b/src/route/fib-entry.cpp
index ddb5dbd..05bee41 100644
--- a/src/route/fib-entry.cpp
+++ b/src/route/fib-entry.cpp
@@ -7,7 +7,7 @@
 using namespace std;
 
 bool
-FibEntry::isEqualNextHops(Nhl& nhlOther)
+FibEntry::isEqualNextHops(NexthopList& nhlOther)
 {
   if (m_nhl.getSize() != nhlOther.getSize())
   {
diff --git a/src/route/fib-entry.hpp b/src/route/fib-entry.hpp
index 66e2e8b..d320c9a 100644
--- a/src/route/fib-entry.hpp
+++ b/src/route/fib-entry.hpp
@@ -3,10 +3,10 @@
 
 #include <list>
 #include <iostream>
-#include <ndn-cpp-dev/util/scheduler.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
 
 #include "nexthop.hpp"
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 
 namespace nlsr {
 
@@ -37,7 +37,7 @@
     return m_name;
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -80,14 +80,14 @@
   }
 
   bool
-  isEqualNextHops(Nhl& nhlOther);
+  isEqualNextHops(NexthopList& nhlOther);
 
 private:
   std::string m_name;
   int m_timeToRefresh;
   ndn::EventId m_expiringEventId;
   int m_seqNo;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 5304d0e..1d7582b 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -1,8 +1,10 @@
 #include <list>
+
+#include "nlsr.hpp"
 #include "fib-entry.hpp"
 #include "fib.hpp"
-#include "nhl.hpp"
-#include "nlsr.hpp"
+#include "nexthop-list.hpp"
+
 
 
 namespace nlsr {
@@ -40,7 +42,8 @@
 Fib::remove(Nlsr& pnlsr, string name)
 {
   std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
-                                                  m_table.end(), bind(&fibEntryNameCompare, _1, name));
+                                                  m_table.end(), 
+                                                  bind(&fibEntryNameCompare, _1, name));
   if (it != m_table.end())
   {
     for (std::list<NextHop>::iterator nhit =
@@ -56,7 +59,7 @@
 
 
 void
-Fib::update(Nlsr& pnlsr, string name, Nhl& nextHopList)
+Fib::update(Nlsr& pnlsr, string name, NexthopList& nextHopList)
 {
   std::cout << "Fib::updateFib Called" << std::endl;
   int startFace = 0;
@@ -145,7 +148,7 @@
 }
 
 int
-Fib::getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix)
+Fib::getNumberOfFacesForName(NexthopList& nextHopList, int maxFacesPerPrefix)
 {
   int endFace = 0;
   if ((maxFacesPerPrefix == 0) || (nextHopList.getSize() <= maxFacesPerPrefix))
@@ -160,7 +163,7 @@
 }
 
 void
-Fib::removeHop(Nlsr& pnlsr, Nhl& nl, int doNotRemoveHopFaceId)
+Fib::removeHop(Nlsr& pnlsr, NexthopList& nl, int doNotRemoveHopFaceId)
 {
   for (std::list<NextHop>::iterator it = nl.getNextHopList().begin();
        it != nl.getNextHopList().end();   ++it)
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index f042362..4a80c48 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -24,7 +24,7 @@
   remove(Nlsr& pnlsr, string name);
 
   void
-  update(Nlsr& pnlsr, string name, Nhl& nextHopList);
+  update(Nlsr& pnlsr, string name, NexthopList& nextHopList);
 
   void
   clean(Nlsr& pnlsr);
@@ -40,10 +40,10 @@
 
 private:
   void
-  removeHop(Nlsr& pnlsr, Nhl& nl, int doNotRemoveHopFaceId);
+  removeHop(Nlsr& pnlsr, NexthopList& nl, int doNotRemoveHopFaceId);
 
   int
-  getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix);
+  getNumberOfFacesForName(NexthopList& nextHopList, int maxFacesPerPrefix);
 
   ndn::EventId
   scheduleEntryRefreshing(Nlsr& pnlsr, string name, int feSeqNum,
diff --git a/src/route/map.hpp b/src/route/map.hpp
index 9c9e6e8..bdacd4d 100644
--- a/src/route/map.hpp
+++ b/src/route/map.hpp
@@ -4,7 +4,7 @@
 #include <iostream>
 #include <list>
 
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 
 namespace nlsr {
 
diff --git a/src/route/npte.cpp b/src/route/name-prefix-table-entry.cpp
similarity index 86%
rename from src/route/npte.cpp
rename to src/route/name-prefix-table-entry.cpp
index 3194635..4389373 100644
--- a/src/route/npte.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -1,6 +1,6 @@
 #include <list>
 #include <utility>
-#include "npte.hpp"
+#include "name-prefix-table-entry.hpp"
 #include "routing-table-entry.hpp"
 #include "nexthop.hpp"
 
@@ -9,7 +9,7 @@
 using namespace std;
 
 void
-Npte::generateNhlfromRteList()
+NamePrefixTableEntry::generateNhlfromRteList()
 {
   m_nhl.reset();
   for (std::list<RoutingTableEntry>::iterator it = m_rteList.begin();
@@ -33,7 +33,7 @@
 }
 
 void
-Npte::removeRoutingTableEntry(RoutingTableEntry& rte)
+NamePrefixTableEntry::removeRoutingTableEntry(RoutingTableEntry& rte)
 {
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_rteList.begin(),
                                                            m_rteList.end(),
@@ -45,7 +45,7 @@
 }
 
 void
-Npte::addRoutingTableEntry(RoutingTableEntry& rte)
+NamePrefixTableEntry::addRoutingTableEntry(RoutingTableEntry& rte)
 {
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_rteList.begin(),
                                                            m_rteList.end(),
@@ -67,7 +67,7 @@
 
 //debugging purpose
 ostream&
-operator<<(ostream& os, Npte& npte)
+operator<<(ostream& os, NamePrefixTableEntry& npte)
 {
   os << "Name: " << npte.getNamePrefix() << endl;
   std::list<RoutingTableEntry> rteList = npte.getRteList();
diff --git a/src/route/npte.hpp b/src/route/name-prefix-table-entry.hpp
similarity index 84%
rename from src/route/npte.hpp
rename to src/route/name-prefix-table-entry.hpp
index 57fdfec..7f4f83a 100644
--- a/src/route/npte.hpp
+++ b/src/route/name-prefix-table-entry.hpp
@@ -9,16 +9,16 @@
 
 using namespace std;
 
-class Npte
+class NamePrefixTableEntry
 {
 public:
-  Npte()
+  NamePrefixTableEntry()
     : m_namePrefix()
     , m_nhl()
   {
   }
 
-  Npte(string np)
+  NamePrefixTableEntry(string np)
     : m_nhl()
   {
     m_namePrefix = np;
@@ -55,7 +55,7 @@
     return m_rteList.size();
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -73,11 +73,11 @@
 private:
   std::string m_namePrefix;
   std::list<RoutingTableEntry> m_rteList;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
-operator<<(std::ostream& os, Npte& npte);
+operator<<(std::ostream& os, NamePrefixTableEntry& npte);
 
 }//namespace nlsr
 
diff --git a/src/route/npt.cpp b/src/route/name-prefix-table.cpp
similarity index 69%
rename from src/route/npt.cpp
rename to src/route/name-prefix-table.cpp
index e094fe3..e37751b 100644
--- a/src/route/npt.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -2,9 +2,10 @@
 #include <utility>
 #include <algorithm>
 
-#include "npt.hpp"
-#include "npte.hpp"
 #include "nlsr.hpp"
+#include "name-prefix-table.hpp"
+#include "name-prefix-table-entry.hpp"
+
 
 
 namespace nlsr {
@@ -12,7 +13,7 @@
 using namespace std;
 
 static bool
-npteCompare(Npte& npte, string& name)
+npteCompare(NamePrefixTableEntry& npte, string& name)
 {
   return npte.getNamePrefix() == name;
 }
@@ -20,13 +21,13 @@
 
 
 void
-Npt::addNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
+NamePrefixTable::addNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
 {
-  std::list<Npte>::iterator it = std::find_if(m_npteList.begin(),
-                                              m_npteList.end(), bind(&npteCompare, _1, name));
+  std::list<NamePrefixTableEntry>::iterator it = std::find_if(m_npteList.begin(),
+                                                              m_npteList.end(), bind(&npteCompare, _1, name));
   if (it == m_npteList.end())
   {
-    Npte newEntry(name);
+    NamePrefixTableEntry newEntry(name);
     newEntry.addRoutingTableEntry(rte);
     newEntry.generateNhlfromRteList();
     newEntry.getNhl().sort();
@@ -55,10 +56,10 @@
 }
 
 void
-Npt::removeNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
+NamePrefixTable::removeNpte(string name, RoutingTableEntry& rte, Nlsr& pnlsr)
 {
-  std::list<Npte>::iterator it = std::find_if(m_npteList.begin(),
-                                              m_npteList.end(), bind(&npteCompare, _1, name));
+  std::list<NamePrefixTableEntry>::iterator it = std::find_if(m_npteList.begin(),
+                                                              m_npteList.end(), bind(&npteCompare, _1, name));
   if (it != m_npteList.end())
   {
     string destRouter = rte.getDestination();
@@ -81,7 +82,7 @@
 
 
 void
-Npt::addNpteByDestName(string name, string destRouter, Nlsr& pnlsr)
+NamePrefixTable::addNpteByDestName(string name, string destRouter, Nlsr& pnlsr)
 {
   RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
@@ -97,7 +98,7 @@
 }
 
 void
-Npt::removeNpte(string name, string destRouter, Nlsr& pnlsr)
+NamePrefixTable::removeNpte(string name, string destRouter, Nlsr& pnlsr)
 {
   RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
@@ -113,9 +114,10 @@
 }
 
 void
-Npt::updateWithNewRoute(Nlsr& pnlsr)
+NamePrefixTable::updateWithNewRoute(Nlsr& pnlsr)
 {
-  for (std::list<Npte>::iterator it = m_npteList.begin(); it != m_npteList.end();
+  for (std::list<NamePrefixTableEntry>::iterator it = m_npteList.begin();
+       it != m_npteList.end();
        ++it)
   {
     std::list<RoutingTableEntry> rteList = (*it).getRteList();
@@ -138,10 +140,11 @@
 }
 
 void
-Npt::print()
+NamePrefixTable::print()
 {
   std::cout << "----------------NPT----------------------" << std::endl;
-  for (std::list<Npte>::iterator it = m_npteList.begin(); it != m_npteList.end();
+  for (std::list<NamePrefixTableEntry>::iterator it = m_npteList.begin();
+       it != m_npteList.end();
        ++it)
   {
     cout << (*it) << endl;
diff --git a/src/route/npt.hpp b/src/route/name-prefix-table.hpp
similarity index 81%
rename from src/route/npt.hpp
rename to src/route/name-prefix-table.hpp
index 8e6cd0a..1a59af2 100644
--- a/src/route/npt.hpp
+++ b/src/route/name-prefix-table.hpp
@@ -2,16 +2,16 @@
 #define NLSR_NPT_HPP
 
 #include <list>
-#include "npte.hpp"
+#include "name-prefix-table-entry.hpp"
 #include "routing-table-entry.hpp"
 
 namespace nlsr {
 class Nlsr;
 
-class Npt
+class NamePrefixTable
 {
 public:
-  Npt()
+  NamePrefixTable()
   {
   }
   void
@@ -34,7 +34,7 @@
   removeNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr);
 
 private:
-  std::list<Npte> m_npteList;
+  std::list<NamePrefixTableEntry> m_npteList;
 };
 
 }//namespace nlsr
diff --git a/src/route/nhl.cpp b/src/route/nexthop-list.cpp
similarity index 91%
rename from src/route/nhl.cpp
rename to src/route/nexthop-list.cpp
index 50d6303..7edb96e 100644
--- a/src/route/nhl.cpp
+++ b/src/route/nexthop-list.cpp
@@ -1,5 +1,5 @@
 #include <iostream>
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 #include "nexthop.hpp"
 
 namespace nlsr {
@@ -34,7 +34,7 @@
 */
 
 void
-Nhl::addNextHop(NextHop& nh)
+NexthopList::addNextHop(NextHop& nh)
 {
   std::list<NextHop>::iterator it = std::find_if(m_nexthopList.begin(),
                                                  m_nexthopList.end(),
@@ -55,7 +55,7 @@
 */
 
 void
-Nhl::removeNextHop(NextHop& nh)
+NexthopList::removeNextHop(NextHop& nh)
 {
   std::list<NextHop>::iterator it = std::find_if(m_nexthopList.begin(),
                                                  m_nexthopList.end(),
@@ -67,13 +67,13 @@
 }
 
 void
-Nhl::sort()
+NexthopList::sort()
 {
   m_nexthopList.sort(nextHopSortingComparator);
 }
 
 ostream&
-operator<<(ostream& os, Nhl& nhl)
+operator<<(ostream& os, NexthopList& nhl)
 {
   std::list<NextHop> nexthopList = nhl.getNextHopList();
   int i = 1;
diff --git a/src/route/nhl.hpp b/src/route/nexthop-list.hpp
similarity index 82%
rename from src/route/nhl.hpp
rename to src/route/nexthop-list.hpp
index ef43373..a8ebe7b 100644
--- a/src/route/nhl.hpp
+++ b/src/route/nexthop-list.hpp
@@ -1,7 +1,7 @@
 #ifndef NLSR_NHL_HPP
 #define NLSR_NHL_HPP
 
-#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cxx/face.hpp>
 #include <list>
 #include <iostream>
 
@@ -10,15 +10,15 @@
 
 namespace nlsr {
 
-class Nhl
+class NexthopList
 {
 public:
-  Nhl()
+  NexthopList()
     : m_nexthopList()
   {
   }
 
-  ~Nhl()
+  ~NexthopList()
   {
   }
   void
@@ -56,7 +56,7 @@
 };
 
 std::ostream&
-operator<<(std::ostream& os, Nhl& nhl);
+operator<<(std::ostream& os, NexthopList& nhl);
 
 }//namespace nlsr
 
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index d63904e..7ec8a23 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -262,7 +262,7 @@
         string nextHopRouterName =
           pMap.getRouterNameByMappingNo(nextHopRouter);
         int nxtHopFace =
-          pnlsr.getAdl().getAdjacent(nextHopRouterName).getConnectingFace();
+          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getConnectingFace();
         std::cout << "Dest Router: " << pMap.getRouterNameByMappingNo(i) << std::endl;
         std::cout << "Next hop Router: " << nextHopRouterName << std::endl;
         std::cout << "Next hop Face: " << nxtHopFace << std::endl;
@@ -401,7 +401,7 @@
       {
         string nextHopRouterName = pMap.getRouterNameByMappingNo(links[j]);
         int nextHopFace =
-          pnlsr.getAdl().getAdjacent(nextHopRouterName).getConnectingFace();
+          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getConnectingFace();
         double distToNbr = getHyperbolicDistance(pnlsr, pMap,
                                                  sourceRouter, links[j]);
         double distToDestFromNbr = getHyperbolicDistance(pnlsr,
diff --git a/src/route/routing-table-entry.hpp b/src/route/routing-table-entry.hpp
index f185e61..8877275 100644
--- a/src/route/routing-table-entry.hpp
+++ b/src/route/routing-table-entry.hpp
@@ -3,7 +3,7 @@
 
 #include <iostream>
 
-#include "nhl.hpp"
+#include "nexthop-list.hpp"
 
 namespace nlsr {
 
@@ -32,7 +32,7 @@
     return m_destination;
   }
 
-  Nhl&
+  NexthopList&
   getNhl()
   {
     return m_nhl;
@@ -40,7 +40,7 @@
 
 private:
   std::string m_destination;
-  Nhl m_nhl;
+  NexthopList m_nhl;
 };
 
 std::ostream&
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 097e95a..2bc827c 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -7,7 +7,7 @@
 #include "map.hpp"
 #include "routing-table-calculator.hpp"
 #include "routing-table-entry.hpp"
-#include "npt.hpp"
+#include "name-prefix-table.hpp"
 
 namespace nlsr {
 
@@ -18,7 +18,7 @@
 {
   //debugging purpose
   std::cout << pnlsr.getConfParameter() << std::endl;
-  pnlsr.getNpt().print();
+  pnlsr.getNamePrefixTable().print();
   pnlsr.getLsdb().printAdjLsdb();
   pnlsr.getLsdb().printCorLsdb();
   pnlsr.getLsdb().printNameLsdb();
@@ -50,10 +50,10 @@
           calculateHypDryRoutingTable(pnlsr);
         }
         //need to update NPT here
-        pnlsr.getNpt().updateWithNewRoute(pnlsr);
+        pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
         //debugging purpose
         printRoutingTable();
-        pnlsr.getNpt().print();
+        pnlsr.getNamePrefixTable().print();
         pnlsr.getFib().print();
         //debugging purpose end
       }
@@ -71,10 +71,10 @@
       clearDryRoutingTable(); // for dry run options
       // need to update NPT here
       std::cout << "Calling Update NPT With new Route" << std::endl;
-      pnlsr.getNpt().updateWithNewRoute(pnlsr);
+      pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
       //debugging purpose
       printRoutingTable();
-      pnlsr.getNpt().print();
+      pnlsr.getNamePrefixTable().print();
       pnlsr.getFib().print();
       //debugging purpose end
     }