29 #include <boost/cstdint.hpp> 31 #include <boost/multi_index_container.hpp> 32 #include <boost/multi_index/hashed_index.hpp> 33 #include <boost/multi_index/mem_fun.hpp> 34 #include <boost/multi_index/tag.hpp> 47 hashed_unique<tag<byRouterName>,
48 const_mem_fun<MapEntry, const ndn::Name&, &MapEntry::getRouter>,
49 std::hash<ndn::Name>>,
50 hashed_unique<tag<byMappingNumber>,
51 const_mem_fun<MapEntry, int32_t, &MapEntry::getMappingNumber>>
74 addEntry(
const ndn::Name& rtrName);
80 template<
typename IteratorType>
85 for (
auto lsa = begin; lsa != end; lsa++) {
86 addEntry(lsa->getOrigRouter());
87 for (
const auto& adjacent : lsa->getAdl().getAdjList()) {
88 addEntry(adjacent.getName());
97 template<
typename IteratorType>
102 for (
auto lsa = begin; lsa != end; lsa++) {
103 addEntry(lsa->getOrigRouter());
107 ndn::optional<ndn::Name>
108 getRouterNameByMappingNo(int32_t mn)
const;
110 ndn::optional<int32_t>
111 getMappingNoByRouterName(
const ndn::Name& rName);
119 return m_entries.size();
129 int32_t m_mappingIndex;
135 #endif // NLSR_MAP_HPP size_t getMapSize() const
void createFromCoordinateLsdb(IteratorType begin, IteratorType end)
multi_index_container< MapEntry, indexed_by< hashed_unique< tag< byRouterName >, const_mem_fun< MapEntry, const ndn::Name &,&MapEntry::getRouter >, std::hash< ndn::Name >>, hashed_unique< tag< byMappingNumber >, const_mem_fun< MapEntry, int32_t,&MapEntry::getMappingNumber >> > > entryContainer
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
void createFromAdjLsdb(IteratorType begin, IteratorType end)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.