blob: 7b7eba1185a370813ff22357e68337f0c8a0bbd9 [file] [log] [blame]
akmhoquefdbddb12014-05-02 18:35:19 -05001#ifndef NLSR_NAME_PREFIX_LIST_HPP
2#define NLSR_NAME_PREFIX_LIST_HPP
akmhoque53353462014-04-22 08:43:45 -05003
4#include <list>
5#include <string>
akmhoquefdbddb12014-05-02 18:35:19 -05006#include <boost/cstdint.hpp>
akmhoque31d1d4b2014-05-05 22:08:14 -05007#include <ndn-cxx/name.hpp>
akmhoquec8a10f72014-04-25 18:42:55 -05008
akmhoque53353462014-04-22 08:43:45 -05009
10namespace nlsr {
akmhoquec8a10f72014-04-25 18:42:55 -050011class NamePrefixList
akmhoque53353462014-04-22 08:43:45 -050012{
13
14public:
akmhoquec8a10f72014-04-25 18:42:55 -050015 NamePrefixList();
akmhoque53353462014-04-22 08:43:45 -050016
akmhoquec8a10f72014-04-25 18:42:55 -050017 ~NamePrefixList();
akmhoque53353462014-04-22 08:43:45 -050018
akmhoquefdbddb12014-05-02 18:35:19 -050019 int32_t
akmhoque31d1d4b2014-05-05 22:08:14 -050020 insert(const ndn::Name& name);
akmhoque53353462014-04-22 08:43:45 -050021
akmhoquefdbddb12014-05-02 18:35:19 -050022 int32_t
akmhoque31d1d4b2014-05-05 22:08:14 -050023 remove(const ndn::Name& name);
akmhoque53353462014-04-22 08:43:45 -050024
25 void
26 sort();
27
akmhoque31d1d4b2014-05-05 22:08:14 -050028 size_t
akmhoque53353462014-04-22 08:43:45 -050029 getSize()
30 {
31 return m_nameList.size();
32 }
33
akmhoque31d1d4b2014-05-05 22:08:14 -050034 std::list<ndn::Name>&
akmhoque53353462014-04-22 08:43:45 -050035 getNameList()
36 {
37 return m_nameList;
38 }
39
40 void
41 print();
42
43private:
akmhoque31d1d4b2014-05-05 22:08:14 -050044 std::list<ndn::Name> m_nameList;
akmhoque53353462014-04-22 08:43:45 -050045
46};
47
48}//namespace nlsr
49
akmhoquefdbddb12014-05-02 18:35:19 -050050#endif //NLSR_NAME_PREFIX_LIST_HPP