build: update waf to version 2.0.6
Fix discovered build issues
Change-Id: I9a861c955283c1b20cc5065a4baa22bd7c2ab0c1
diff --git a/src/lsa.hpp b/src/lsa.hpp
index 71da57c..7272aed 100644
--- a/src/lsa.hpp
+++ b/src/lsa.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_LSA_HPP
#define NLSR_LSA_HPP
@@ -54,6 +54,9 @@
{
}
+ virtual
+ ~Lsa() = default;
+
virtual Type
getType() const
{
@@ -155,7 +158,7 @@
ndn::EventId m_expiringEventId;
};
-class NameLsa: public Lsa
+class NameLsa : public Lsa
{
public:
NameLsa()
@@ -229,7 +232,7 @@
operator<<(std::ostream& os, const NameLsa& lsa);
};
-class AdjLsa: public Lsa
+class AdjLsa : public Lsa
{
public:
typedef AdjacencyList::const_iterator const_iterator;
@@ -327,7 +330,7 @@
operator<<(std::ostream& os, const AdjLsa& lsa);
};
-class CoordinateLsa: public Lsa
+class CoordinateLsa : public Lsa
{
public:
CoordinateLsa()
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index 56b53a1..0c561ab 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,8 +17,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/>.
- *
- **/
+ */
#ifndef NLSR_ROUTE_FIB_HPP
#define NLSR_ROUTE_FIB_HPP
@@ -64,6 +63,9 @@
{
}
+ VIRTUAL_WITH_TESTS
+ ~Fib() = default;
+
/*! \brief Completely remove a name prefix from the FIB.
*
* If a name prefix is found to no longer be reachable from this
diff --git a/src/tlv/adjacency-lsa.cpp b/src/tlv/adjacency-lsa.cpp
index eb694b1..72f138b 100644
--- a/src/tlv/adjacency-lsa.cpp
+++ b/src/tlv/adjacency-lsa.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#include "adjacency-lsa.hpp"
#include "tlv-nlsr.hpp"
@@ -26,7 +26,7 @@
#include <ndn-cxx/encoding/block-helpers.hpp>
namespace nlsr {
-namespace tlv {
+namespace tlv {
BOOST_CONCEPT_ASSERT((ndn::WireEncodable<AdjacencyLsa>));
BOOST_CONCEPT_ASSERT((ndn::WireDecodable<AdjacencyLsa>));
@@ -62,11 +62,7 @@
return totalLength;
}
-template size_t
-AdjacencyLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& encoder) const;
-
-template size_t
-AdjacencyLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& encoder) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(AdjacencyLsa);
const ndn::Block&
AdjacencyLsa::wireEncode() const
@@ -95,10 +91,8 @@
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::AdjacencyLsa) {
- std::stringstream error;
- error << "Expected AdjacencyLsa Block, but Block is of a different type: #"
- << m_wire.type();
- throw Error(error.str());
+ BOOST_THROW_EXCEPTION(Error("Expected AdjacencyLsa Block, but Block is of a different type: #" +
+ ndn::to_string(m_wire.type())));
}
m_wire.parse();
@@ -110,7 +104,7 @@
++val;
}
else {
- throw Error("Missing required LsaInfo field");
+ BOOST_THROW_EXCEPTION(Error("Missing required LsaInfo field"));
}
for (; val != m_wire.elements_end(); ++val) {
@@ -119,10 +113,8 @@
m_hasAdjacencies = true;
}
else {
- std::stringstream error;
- error << "Expected Adjacency Block, but Block is of a different type: #"
- << m_wire.type();
- throw Error(error.str());
+ BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
+ ndn::to_string(m_wire.type())));
}
}
}
diff --git a/src/tlv/adjacency-lsa.hpp b/src/tlv/adjacency-lsa.hpp
index f1854a4..20c775d 100644
--- a/src/tlv/adjacency-lsa.hpp
+++ b/src/tlv/adjacency-lsa.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_ADJACENCY_LSA_HPP
#define NLSR_TLV_ADJACENCY_LSA_HPP
@@ -153,6 +153,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(AdjacencyLsa);
+
inline AdjacencyLsa::iterator
AdjacencyLsa::begin() const
{
diff --git a/src/tlv/adjacency.cpp b/src/tlv/adjacency.cpp
index 79ebf66..b9adec9 100644
--- a/src/tlv/adjacency.cpp
+++ b/src/tlv/adjacency.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#include "adjacency.hpp"
#include "tlv-nlsr.hpp"
@@ -26,7 +26,7 @@
#include <ndn-cxx/encoding/block-helpers.hpp>
namespace nlsr {
-namespace tlv {
+namespace tlv {
BOOST_CONCEPT_ASSERT((ndn::WireEncodable<Adjacency>));
BOOST_CONCEPT_ASSERT((ndn::WireDecodable<Adjacency>));
@@ -62,11 +62,7 @@
return totalLength;
}
-template size_t
-Adjacency::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
-
-template size_t
-Adjacency::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(Adjacency);
const ndn::Block&
Adjacency::wireEncode() const
@@ -96,10 +92,8 @@
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::Adjacency) {
- std::stringstream error;
- error << "Expected Adjacency Block, but Block is of a different type: #"
- << m_wire.type();
- throw Error(error.str());
+ BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
+ ndn::to_string(m_wire.type())));
}
m_wire.parse();
@@ -111,7 +105,7 @@
++val;
}
else {
- throw Error("Missing required Name field");
+ BOOST_THROW_EXCEPTION(Error("Missing required Name field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Uri) {
@@ -119,7 +113,7 @@
++val;
}
else {
- throw Error("Missing required Uri field");
+ BOOST_THROW_EXCEPTION(Error("Missing required Uri field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Cost) {
@@ -127,7 +121,7 @@
++val;
}
else {
- throw Error("Missing required Cost field");
+ BOOST_THROW_EXCEPTION(Error("Missing required Cost field"));
}
}
diff --git a/src/tlv/adjacency.hpp b/src/tlv/adjacency.hpp
index 2e5dec7..4046e8f 100644
--- a/src/tlv/adjacency.hpp
+++ b/src/tlv/adjacency.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_ADJACENCY_HPP
#define NLSR_TLV_ADJACENCY_HPP
@@ -137,6 +137,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Adjacency);
+
std::ostream&
operator<<(std::ostream& os, const Adjacency& adjacency);
diff --git a/src/tlv/coordinate-lsa.cpp b/src/tlv/coordinate-lsa.cpp
index ab39fe8..dc6919e 100644
--- a/src/tlv/coordinate-lsa.cpp
+++ b/src/tlv/coordinate-lsa.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
@@ -17,7 +17,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/>.
- **/
+ */
#include "coordinate-lsa.hpp"
#include "tlv-nlsr.hpp"
@@ -74,11 +74,7 @@
return totalLength;
}
-template size_t
-CoordinateLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
-
-template size_t
-CoordinateLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(CoordinateLsa);
const ndn::Block&
CoordinateLsa::wireEncode() const
diff --git a/src/tlv/coordinate-lsa.hpp b/src/tlv/coordinate-lsa.hpp
index 18c32ab..603c119 100644
--- a/src/tlv/coordinate-lsa.hpp
+++ b/src/tlv/coordinate-lsa.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_COORDINATE_LSA_HPP
#define NLSR_TLV_COORDINATE_LSA_HPP
@@ -141,6 +141,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CoordinateLsa);
+
std::ostream&
operator<<(std::ostream& os, const CoordinateLsa& coordinateLsa);
diff --git a/src/tlv/lsa-info.cpp b/src/tlv/lsa-info.cpp
index 8b36ff0..5f83863 100644
--- a/src/tlv/lsa-info.cpp
+++ b/src/tlv/lsa-info.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#include "lsa-info.hpp"
#include "tlv-nlsr.hpp"
@@ -72,11 +72,7 @@
return totalLength;
}
-template size_t
-LsaInfo::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
-
-template size_t
-LsaInfo::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(LsaInfo);
const ndn::Block&
LsaInfo::wireEncode() const
diff --git a/src/tlv/lsa-info.hpp b/src/tlv/lsa-info.hpp
index 4573661..291c428 100644
--- a/src/tlv/lsa-info.hpp
+++ b/src/tlv/lsa-info.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_LSA_INFO_HPP
#define NLSR_TLV_LSA_INFO_HPP
@@ -154,6 +154,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(LsaInfo);
+
std::ostream&
operator<<(std::ostream& os, const LsaInfo& lsaInfo);
diff --git a/src/tlv/lsdb-status.cpp b/src/tlv/lsdb-status.cpp
index e447863..f39cd27 100644
--- a/src/tlv/lsdb-status.cpp
+++ b/src/tlv/lsdb-status.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
@@ -17,7 +17,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/>.
- **/
+ */
#include "lsdb-status.hpp"
#include "tlv-nlsr.hpp"
@@ -123,13 +123,7 @@
return totalLength;
}
-NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(LsdbStatus);
-
-template size_t
-LsdbStatus::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
-
-template size_t
-LsdbStatus::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(LsdbStatus);
const ndn::Block&
LsdbStatus::wireEncode() const
diff --git a/src/tlv/lsdb-status.hpp b/src/tlv/lsdb-status.hpp
index b144ae2..7d93859 100644
--- a/src/tlv/lsdb-status.hpp
+++ b/src/tlv/lsdb-status.hpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_LSDB_STATUS_HPP
#define NLSR_TLV_LSDB_STATUS_HPP
@@ -165,6 +165,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(LsdbStatus);
+
std::ostream&
operator<<(std::ostream& os, const LsdbStatus& lsdbStatus);
diff --git a/src/tlv/name-lsa.cpp b/src/tlv/name-lsa.cpp
index 013bfb3..82f3860 100644
--- a/src/tlv/name-lsa.cpp
+++ b/src/tlv/name-lsa.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#include "name-lsa.hpp"
#include "tlv-nlsr.hpp"
@@ -26,7 +26,7 @@
#include <ndn-cxx/encoding/block-helpers.hpp>
namespace nlsr {
-namespace tlv {
+namespace tlv {
BOOST_CONCEPT_ASSERT((ndn::WireEncodable<NameLsa>));
BOOST_CONCEPT_ASSERT((ndn::WireDecodable<NameLsa>));
@@ -62,11 +62,7 @@
return totalLength;
}
-template size_t
-NameLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
-
-template size_t
-NameLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(NameLsa);
const ndn::Block&
NameLsa::wireEncode() const
@@ -95,10 +91,8 @@
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::NameLsa) {
- std::stringstream error;
- error << "Expected NameLsa Block, but Block is of a different type: #"
- << m_wire.type();
- throw Error(error.str());
+ BOOST_THROW_EXCEPTION(Error("Expected NameLsa Block, but Block is of a different type: #" +
+ ndn::to_string(m_wire.type())));
}
m_wire.parse();
@@ -110,7 +104,7 @@
++val;
}
else {
- throw Error("Missing required LsaInfo field");
+ BOOST_THROW_EXCEPTION(Error("Missing required LsaInfo field"));
}
for (; val != m_wire.elements_end(); ++val) {
@@ -119,10 +113,8 @@
m_hasNames = true;
}
else {
- std::stringstream error;
- error << "Expected Name Block, but Block is of a different type: #"
- << m_wire.type();
- throw Error(error.str());
+ BOOST_THROW_EXCEPTION(Error("Expected Name Block, but Block is of a different type: #" +
+ ndn::to_string(m_wire.type())));
}
}
}
diff --git a/src/tlv/name-lsa.hpp b/src/tlv/name-lsa.hpp
index 2e137be..0278631 100644
--- a/src/tlv/name-lsa.hpp
+++ b/src/tlv/name-lsa.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -17,7 +17,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/>.
- **/
+ */
#ifndef NLSR_TLV_NAME_LSA_HPP
#define NLSR_TLV_NAME_LSA_HPP
@@ -152,6 +152,8 @@
mutable ndn::Block m_wire;
};
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NameLsa);
+
inline NameLsa::iterator
NameLsa::begin() const
{