publisher: remove unused functions
Change-Id: Ifc9a590de11fa841b1d27027d46a9376c5dff41f refs: #4127
This commit is contained in:
1 parent
9ea3639be2
commit
c64bed22a8
3 files changed
-92
No files matched your search
@@ -185,82 +185,4 @@ DatasetInterestHandler::publishRtStatus(const ndn::Name& topPrefix, const ndn::I
|
||||
context.end();
|
||||
}
|
||||
|
||||
template<> std::list<tlv::AdjacencyLsa>
|
||||
getTlvLsas<tlv::AdjacencyLsa>(const Lsdb& lsdb)
|
||||
{
|
||||
std::list<tlv::AdjacencyLsa> lsas;
|
||||
|
||||
auto lsaRange = std::make_pair<std::list<AdjLsa>::const_iterator,
|
||||
std::list<AdjLsa>::const_iterator>(
|
||||
lsdb.getAdjLsdb().cbegin(), lsdb.getAdjLsdb().cend());
|
||||
for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
|
||||
tlv::AdjacencyLsa tlvLsa;
|
||||
|
||||
std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
|
||||
tlvLsa.setLsaInfo(*tlvLsaInfo);
|
||||
|
||||
for (const Adjacent& adj : lsa->getAdl().getAdjList()) {
|
||||
tlv::Adjacency tlvAdj;
|
||||
tlvAdj.setName(adj.getName());
|
||||
tlvAdj.setUri(adj.getFaceUri().toString());
|
||||
tlvAdj.setCost(adj.getLinkCost());
|
||||
tlvLsa.addAdjacency(tlvAdj);
|
||||
}
|
||||
lsas.push_back(tlvLsa);
|
||||
}
|
||||
|
||||
return lsas;
|
||||
|
||||
}
|
||||
|
||||
template<> std::list<tlv::CoordinateLsa>
|
||||
getTlvLsas<tlv::CoordinateLsa>(const Lsdb& lsdb)
|
||||
{
|
||||
std::list<tlv::CoordinateLsa> lsas;
|
||||
|
||||
auto lsaRange = std::make_pair<std::list<CoordinateLsa>::const_iterator,
|
||||
std::list<CoordinateLsa>::const_iterator>(
|
||||
lsdb.getCoordinateLsdb().cbegin(), lsdb.getCoordinateLsdb().cend());
|
||||
|
||||
for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
|
||||
tlv::CoordinateLsa tlvLsa;
|
||||
|
||||
std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
|
||||
tlvLsa.setLsaInfo(*tlvLsaInfo);
|
||||
|
||||
tlvLsa.setHyperbolicRadius(lsa->getCorRadius());
|
||||
tlvLsa.setHyperbolicAngle(lsa->getCorTheta());
|
||||
|
||||
lsas.push_back(tlvLsa);
|
||||
}
|
||||
|
||||
return lsas;
|
||||
|
||||
}
|
||||
|
||||
template<> std::list<tlv::NameLsa>
|
||||
getTlvLsas<tlv::NameLsa>(const Lsdb& lsdb)
|
||||
{
|
||||
std::list<tlv::NameLsa> lsas;
|
||||
|
||||
auto lsaRange = std::make_pair<std::list<NameLsa>::const_iterator,
|
||||
std::list<NameLsa>::const_iterator>(
|
||||
lsdb.getNameLsdb().cbegin(), lsdb.getNameLsdb().cend());
|
||||
for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
|
||||
tlv::NameLsa tlvLsa;
|
||||
|
||||
std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
|
||||
tlvLsa.setLsaInfo(*tlvLsaInfo);
|
||||
|
||||
for (const ndn::Name& name : lsa->getNpl().getNames()) {
|
||||
tlvLsa.addName(name);
|
||||
}
|
||||
|
||||
lsas.push_back(tlvLsa);
|
||||
}
|
||||
|
||||
return lsas;
|
||||
|
||||
}
|
||||
|
||||
} // namespace nlsr
|
||||
@@ -119,18 +119,6 @@ private:
|
||||
const std::list<RoutingTableEntry>& m_dryRoutingTableEntries;
|
||||
};
|
||||
|
||||
template<typename T> std::list<T>
|
||||
getTlvLsas(const Lsdb& lsdb);
|
||||
|
||||
template<> std::list<tlv::AdjacencyLsa>
|
||||
getTlvLsas<tlv::AdjacencyLsa>(const Lsdb& lsdb);
|
||||
|
||||
template<> std::list<tlv::CoordinateLsa>
|
||||
getTlvLsas<tlv::CoordinateLsa>(const Lsdb& lsdb);
|
||||
|
||||
template<> std::list<tlv::NameLsa>
|
||||
getTlvLsas<tlv::NameLsa>(const Lsdb& lsdb);
|
||||
|
||||
} // namespace nlsr
|
||||
|
||||
#endif // NLSR_PUBLISHER_DATASET_INTEREST_HANDLER_HPP
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <ndn-cxx/util/concepts.hpp>
|
||||
#include <ndn-cxx/encoding/block-helpers.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace nlsr {
|
||||
namespace tlv {
|
||||
|
||||
|
||||
Reference in new issue
Block a user