blob: 08bd4867ccb0cc5e740b9d910596f4415f5dd550 [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
akmhoque674b0b12014-05-20 14:33:28 -050041 writeLog();
42
43 void
akmhoque53353462014-04-22 08:43:45 -050044 print();
45
46private:
akmhoque31d1d4b2014-05-05 22:08:14 -050047 std::list<ndn::Name> m_nameList;
akmhoque53353462014-04-22 08:43:45 -050048
49};
50
51}//namespace nlsr
52
akmhoquefdbddb12014-05-02 18:35:19 -050053#endif //NLSR_NAME_PREFIX_LIST_HPP