akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 1 | #ifndef NPL_HPP |
2 | #define NPL_HPP | ||||
3 | |||||
4 | #include <list> | ||||
5 | #include <string> | ||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 6 | |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 7 | |
8 | namespace nlsr { | ||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 9 | class NamePrefixList |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 10 | { |
11 | |||||
12 | public: | ||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 13 | NamePrefixList(); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 14 | |
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 | |
17 | int | ||||
18 | insert(std::string& name); | ||||
19 | |||||
20 | int | ||||
21 | remove(std::string& name); | ||||
22 | |||||
23 | void | ||||
24 | sort(); | ||||
25 | |||||
26 | int | ||||
27 | getSize() | ||||
28 | { | ||||
29 | return m_nameList.size(); | ||||
30 | } | ||||
31 | |||||
32 | std::list<std::string>& | ||||
33 | getNameList() | ||||
34 | { | ||||
35 | return m_nameList; | ||||
36 | } | ||||
37 | |||||
38 | void | ||||
39 | print(); | ||||
40 | |||||
41 | private: | ||||
42 | std::list<std::string> m_nameList; | ||||
43 | |||||
44 | }; | ||||
45 | |||||
46 | }//namespace nlsr | ||||
47 | |||||
48 | #endif //NPL_HPP |