lsdb: rebuild using boost::multi_index to replace 3 LSA lists
refs: #4127
Co-authored-by: Nick Gordon <nmgordon@memphis.edu>
Change-Id: Ic179f90019e472157b0d61c6db02a4afaf4843b6
diff --git a/src/lsa/name-lsa.hpp b/src/lsa/name-lsa.hpp
index 3223839..5e9c8d5 100644
--- a/src/lsa/name-lsa.hpp
+++ b/src/lsa/name-lsa.hpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2020, 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_NAME_LSA_HPP
#define NLSR_LSA_NAME_LSA_HPP
@@ -37,15 +37,21 @@
public:
NameLsa() = default;
- NameLsa(const ndn::Name& originRouter, uint32_t seqNo,
+ NameLsa(const ndn::Name& originRouter, uint64_t seqNo,
const ndn::time::system_clock::TimePoint& timepoint,
- NamePrefixList& npl);
+ const NamePrefixList& npl);
NameLsa(const ndn::Block& block);
Lsa::Type
getType() const override
{
+ return type();
+ }
+
+ static constexpr Lsa::Type
+ type()
+ {
return Lsa::Type::NAME;
}
@@ -83,14 +89,16 @@
wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
- wireEncode() const;
+ wireEncode() const override;
void
wireDecode(const ndn::Block& wire);
+ std::string
+ toString() const override;
+
private:
NamePrefixList m_npl;
- mutable ndn::Block m_wire;
};
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NameLsa);