akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 1 | #ifndef NLSR_NAME_PREFIX_LIST_HPP |
2 | #define NLSR_NAME_PREFIX_LIST_HPP | ||||
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 3 | |
4 | #include <list> | ||||
5 | #include <string> | ||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 6 | #include <boost/cstdint.hpp> |
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 7 | #include <ndn-cxx/name.hpp> |
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 8 | |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 9 | |
10 | namespace nlsr { | ||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 11 | class NamePrefixList |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 12 | { |
13 | |||||
14 | public: | ||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 15 | NamePrefixList(); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 16 | |
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 17 | ~NamePrefixList(); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 18 | |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 19 | int32_t |
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 20 | insert(const ndn::Name& name); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 21 | |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 22 | int32_t |
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 23 | remove(const ndn::Name& name); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 24 | |
25 | void | ||||
26 | sort(); | ||||
27 | |||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 28 | size_t |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 29 | getSize() |
30 | { | ||||
31 | return m_nameList.size(); | ||||
32 | } | ||||
33 | |||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 34 | std::list<ndn::Name>& |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 35 | getNameList() |
36 | { | ||||
37 | return m_nameList; | ||||
38 | } | ||||
39 | |||||
40 | void | ||||
41 | print(); | ||||
42 | |||||
43 | private: | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 44 | std::list<ndn::Name> m_nameList; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 45 | |
46 | }; | ||||
47 | |||||
48 | }//namespace nlsr | ||||
49 | |||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 50 | #endif //NLSR_NAME_PREFIX_LIST_HPP |