blob: dda4508c8caa0eb27d0bddac08d1211977ef1c7f [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>
akmhoquec8a10f72014-04-25 18:42:55 -05007
akmhoque53353462014-04-22 08:43:45 -05008
9namespace nlsr {
akmhoquec8a10f72014-04-25 18:42:55 -050010class NamePrefixList
akmhoque53353462014-04-22 08:43:45 -050011{
12
13public:
akmhoquec8a10f72014-04-25 18:42:55 -050014 NamePrefixList();
akmhoque53353462014-04-22 08:43:45 -050015
akmhoquec8a10f72014-04-25 18:42:55 -050016 ~NamePrefixList();
akmhoque53353462014-04-22 08:43:45 -050017
akmhoquefdbddb12014-05-02 18:35:19 -050018 int32_t
19 insert(const std::string& name);
akmhoque53353462014-04-22 08:43:45 -050020
akmhoquefdbddb12014-05-02 18:35:19 -050021 int32_t
22 remove(const std::string& name);
akmhoque53353462014-04-22 08:43:45 -050023
24 void
25 sort();
26
akmhoquefdbddb12014-05-02 18:35:19 -050027 int32_t
akmhoque53353462014-04-22 08:43:45 -050028 getSize()
29 {
30 return m_nameList.size();
31 }
32
33 std::list<std::string>&
34 getNameList()
35 {
36 return m_nameList;
37 }
38
39 void
40 print();
41
42private:
43 std::list<std::string> m_nameList;
44
45};
46
47}//namespace nlsr
48
akmhoquefdbddb12014-05-02 18:35:19 -050049#endif //NLSR_NAME_PREFIX_LIST_HPP