route: rename Map to NameMap
The `Map` type is renamed to `NameMap` to better reflect what it does.
`createFromAdjLsdb` and `createFromCoordinateLsdb` functions are changed
to static functions, to match how they are used in callsites.
Unnecessary shared_ptr usage in `createFromAdjLsdb` is eliminated.
Doxygen of `NameMap` is added or improved.
refs #5308
Change-Id: I05db235efc1c6719f14b96758e3acde7826aabe7
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index e65f5c0..061e151 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -21,7 +21,7 @@
#include "routing-table-calculator.hpp"
#include "lsdb.hpp"
-#include "map.hpp"
+#include "name-map.hpp"
#include "nexthop.hpp"
#include "nlsr.hpp"
#include "logger.hpp"
@@ -63,7 +63,7 @@
}
void
-RoutingTableCalculator::makeAdjMatrix(const Lsdb& lsdb, Map& pMap)
+RoutingTableCalculator::makeAdjMatrix(const Lsdb& lsdb, NameMap& pMap)
{
// For each LSA represented in the map
auto lsaRange = lsdb.getLsdbIterator<AdjLsa>();
@@ -120,7 +120,7 @@
}
void
-RoutingTableCalculator::writeAdjMatrixLog(const Map& map) const
+RoutingTableCalculator::writeAdjMatrixLog(const NameMap& map) const
{
if (!ndn_cxx_getLogger().isLevelEnabled(ndn::util::LogLevel::DEBUG)) {
return;
@@ -232,7 +232,7 @@
}
void
-LinkStateRoutingTableCalculator::calculatePath(Map& pMap, RoutingTable& rt,
+LinkStateRoutingTableCalculator::calculatePath(NameMap& pMap, RoutingTable& rt,
ConfParameter& confParam,
const Lsdb& lsdb)
{
@@ -327,7 +327,7 @@
void
LinkStateRoutingTableCalculator::addAllLsNextHopsToRoutingTable(AdjacencyList& adjacencies,
- RoutingTable& rt, Map& pMap,
+ RoutingTable& rt, NameMap& pMap,
uint32_t sourceRouter)
{
NLSR_LOG_DEBUG("LinkStateRoutingTableCalculator::addAllNextHopsToRoutingTable Called");
@@ -426,7 +426,7 @@
}
void
-HyperbolicRoutingCalculator::calculatePath(Map& map, RoutingTable& rt,
+HyperbolicRoutingCalculator::calculatePath(NameMap& map, RoutingTable& rt,
Lsdb& lsdb, AdjacencyList& adjacencies)
{
NLSR_LOG_TRACE("Calculating hyperbolic paths");