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.cpp b/src/route/routing-table.cpp
index fa7dee7..16bf2df 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -20,7 +20,7 @@
#include "routing-table.hpp"
#include "nlsr.hpp"
-#include "map.hpp"
+#include "name-map.hpp"
#include "conf-parameter.hpp"
#include "routing-table-calculator.hpp"
#include "routing-table-entry.hpp"
@@ -127,9 +127,8 @@
clearRoutingTable();
- Map map;
auto lsaRange = m_lsdb.getLsdbIterator<AdjLsa>();
- map.createFromAdjLsdb(lsaRange.first, lsaRange.second);
+ auto map = NameMap::createFromAdjLsdb(lsaRange.first, lsaRange.second);
NLSR_LOG_DEBUG(map);
size_t nRouters = map.size();
@@ -153,9 +152,8 @@
clearRoutingTable();
}
- Map map;
auto lsaRange = m_lsdb.getLsdbIterator<CoordinateLsa>();
- map.createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
+ auto map = NameMap::createFromCoordinateLsdb(lsaRange.first, lsaRange.second);
NLSR_LOG_DEBUG(map);
size_t nRouters = map.size();