map-entry.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NLSR_MAP_ENTRY_HPP
23 #define NLSR_MAP_ENTRY_HPP
24 
25 #include <boost/cstdint.hpp>
26 #include <ndn-cxx/name.hpp>
27 
28 namespace nlsr {
29 
30 class MapEntry
31 {
32 public:
34  : m_router()
35  , m_mappingNumber(-1)
36  {
37  }
38 
40  {
41  }
42 
43  MapEntry(const ndn::Name& rtr, int32_t mn)
44  {
45  m_router = rtr;
46  m_mappingNumber = mn;
47  }
48 
49  const ndn::Name&
50  getRouter() const
51  {
52  return m_router;
53  }
54 
55  int32_t
57  {
58  return m_mappingNumber;
59  }
60 
61  void
62  reset();
63 
64 private:
65  ndn::Name m_router;
66  int32_t m_mappingNumber;
67 };
68 
69 } // namespace nlsr
70 
71 #endif // NLSR_MAP_ENTRY_HPP
Copyright (c) 2014-2019, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
int32_t getMappingNumber() const
Definition: map-entry.hpp:56
MapEntry(const ndn::Name &rtr, int32_t mn)
Definition: map-entry.hpp:43
const ndn::Name & getRouter() const
Definition: map-entry.hpp:50