routing: made map more container-agnostic

Change-Id: Ib18a41bac7627a9eb0bbafa6ccad0335d420dd68
refs: #4239
This commit is contained in:
Nick Gordon committed 2017-08-15 09:06:28 -07:00
1 parent 90173ad966
commit 22b5c957c0
9 files changed
+85 -55

No files matched your search

+8 -9
View File
@@ -16,13 +16,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*
* \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
*
**/
#include <iostream>
#include <string>
#include <list>
#include "routing-table.hpp"
#include "nlsr.hpp"
@@ -33,6 +27,10 @@
#include "name-prefix-table.hpp"
#include "logger.hpp"
#include <iostream>
#include <string>
#include <list>
namespace nlsr {
INIT_LOGGER("RoutingTable");
@@ -123,7 +121,7 @@ RoutingTable::calculateLsRoutingTable(Nlsr& nlsr)
_LOG_DEBUG("RoutingTable::calculateLsRoutingTable Called");
Map map;
map.createFromAdjLsdb(nlsr);
map.createFromAdjLsdb(nlsr.getLsdb().getAdjLsdb().begin(), nlsr.getLsdb().getAdjLsdb().end());
map.writeLog();
size_t nRouters = map.getMapSize();
@@ -137,7 +135,8 @@ void
RoutingTable::calculateHypRoutingTable(Nlsr& nlsr)
{
Map map;
map.createFromCoordinateLsdb(nlsr);
map.createFromCoordinateLsdb(nlsr.getLsdb().getCoordinateLsdb().begin(),
nlsr.getLsdb().getCoordinateLsdb().end());
map.writeLog();
size_t nRouters = map.getMapSize();
@@ -153,7 +152,7 @@ void
RoutingTable::calculateHypDryRoutingTable(Nlsr& nlsr)
{
Map map;
map.createFromAdjLsdb(nlsr);
map.createFromAdjLsdb(nlsr.getLsdb().getAdjLsdb().begin(), nlsr.getLsdb().getAdjLsdb().end());
map.writeLog();
size_t nRouters = map.getMapSize();