lsa: cleanup operator<<
Delete .toString() virtual function in favor of ostream output.
Delete Lsa::getOriginRouterCopy() in favor of a custom Boost.Multi-Index
key extractor.
Mark single-parameter constructor as 'explicit'.
Rewrite class-level Doxygen with ABNF syntax.
refs #5308
Change-Id: I3c43395ce86f9a1a52da186fcf8c5a15cf35fe40
diff --git a/src/lsa/coordinate-lsa.cpp b/src/lsa/coordinate-lsa.cpp
index be42d9e..11428f8 100644
--- a/src/lsa/coordinate-lsa.cpp
+++ b/src/lsa/coordinate-lsa.cpp
@@ -119,18 +119,14 @@
m_hyperbolicAngles = angles;
}
-std::string
-CoordinateLsa::toString() const
+void
+CoordinateLsa::print(std::ostream& os) const
{
- std::ostringstream os;
- os << getString();
os << " Hyperbolic Radius : " << m_hyperbolicRadius << "\n";
int i = 0;
for (const auto& value : m_hyperbolicAngles) {
os << " Hyperbolic Theta " << i++ << " : " << value << "\n";
}
-
- return os.str();
}
std::tuple<bool, std::list<ndn::Name>, std::list<ndn::Name>>
@@ -148,10 +144,4 @@
return {false, std::list<ndn::Name>{}, std::list<ndn::Name>{}};
}
-std::ostream&
-operator<<(std::ostream& os, const CoordinateLsa& lsa)
-{
- return os << lsa.toString();
-}
-
} // namespace nlsr