blob: 9174345839692aa02c3c88589ac085727b0f8ac7 [file] [log] [blame]
akmhoquefdbddb12014-05-02 18:35:19 -05001#ifndef NLSR_MAP_ENTRY_HPP
2#define NLSR_MAP_ENTRY_HPP
3
4#include <boost/cstdint.hpp>
5
6namespace nlsr{
7
8class MapEntry
9{
10public:
11 MapEntry()
12 : m_router()
13 , m_mappingNumber(-1)
14 {
15 }
16
17 ~MapEntry()
18 {
19 }
20
21 MapEntry(const std::string& rtr, int32_t mn)
22 {
23 m_router = rtr;
24 m_mappingNumber = mn;
25 }
26
27 const std::string&
28 getRouter() const
29 {
30 return m_router;
31 }
32
33 int32_t
34 getMappingNumber() const
35 {
36 return m_mappingNumber;
37 }
38
39private:
40 std::string m_router;
41 int32_t m_mappingNumber;
42};
43
44inline std::ostream&
45operator<<(std::ostream& os, const MapEntry& mpe)
46{
47 os << "MapEntry: ( Router: " << mpe.getRouter() << " Mapping No: ";
48 os << mpe.getMappingNumber() << " )" << std::endl;
49 return os;
50}
51
52} // namespace nlsr
53
54#endif // NLSR_MAP_ENTRY_HPP