22 #ifndef NLSR_NAME_PREFIX_LIST_HPP
23 #define NLSR_NAME_PREFIX_LIST_HPP
27 #include <initializer_list>
33 #include <ndn-cxx/name.hpp>
40 using NamePair = std::tuple<ndn::Name, std::vector<std::string>>;
59 : m_names(namesAndSources)
69 insert(
const ndn::Name& name,
const std::string& source =
"");
76 remove(
const ndn::Name& name,
const std::string& source =
"");
84 return m_names.size();
105 const std::vector<std::string>
120 std::vector<NamePair>::iterator
121 get(
const ndn::Name& name);
125 std::vector<std::string>::iterator
126 getSource(
const std::string& source, std::vector<NamePair>::iterator& entry);
128 std::vector<NamePair> m_names;
132 operator<<(std::ostream& os,
const NamePrefixList& list);
bool operator==(const NamePrefixList &other) const
bool remove(const ndn::Name &name, const std::string &source="")
removes name from NamePrefixList
bool insert(const ndn::Name &name, const std::string &source="")
inserts name into NamePrefixList
std::tuple< ndn::Name, std::vector< std::string > > NamePair
uint32_t countSources(const ndn::Name &name) const
std::list< ndn::Name > getNames() const
const std::vector< std::string > getSources(const ndn::Name &name) const
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)