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/coordinate-lsa.hpp b/src/lsa/coordinate-lsa.hpp
index abeea2c..4b07627 100644
--- a/src/lsa/coordinate-lsa.hpp
+++ b/src/lsa/coordinate-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_COORDINATE_LSA_HPP
#define NLSR_LSA_COORDINATE_LSA_HPP
@@ -38,7 +38,7 @@
public:
CoordinateLsa() = default;
- CoordinateLsa(const ndn::Name& originRouter, uint32_t seqNo,
+ CoordinateLsa(const ndn::Name& originRouter, uint64_t seqNo,
const ndn::time::system_clock::TimePoint& timepoint,
double radius, std::vector<double> angles);
@@ -47,6 +47,12 @@
Lsa::Type
getType() const override
{
+ return type();
+ }
+
+ static constexpr Lsa::Type
+ type()
+ {
return Lsa::Type::COORDINATE;
}
@@ -84,16 +90,17 @@
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:
double m_hyperbolicRadius = 0.0;
std::vector<double> m_hyperbolicAngles;
-
- mutable ndn::Block m_wire;
};
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CoordinateLsa);