Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_TABLE_FIB_NEXTHOP_HPP |
| 8 | #define NFD_TABLE_FIB_NEXTHOP_HPP |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | #include "face/face.hpp" |
| 12 | |
| 13 | namespace ndn { |
| 14 | namespace fib { |
| 15 | |
| 16 | /** \class NextHop |
| 17 | * \brief represents a nexthop record in FIB entry |
| 18 | */ |
| 19 | class NextHop |
| 20 | { |
| 21 | public: |
| 22 | NextHop(shared_ptr<Face> face); |
| 23 | |
| 24 | NextHop(const NextHop& other); |
| 25 | |
| 26 | shared_ptr<Face> |
| 27 | getFace() const; |
| 28 | |
| 29 | void |
| 30 | setCost(int32_t cost); |
| 31 | |
| 32 | int32_t |
| 33 | getCost() const; |
| 34 | |
| 35 | private: |
| 36 | shared_ptr<Face> m_face; |
| 37 | int32_t m_cost; |
| 38 | }; |
| 39 | |
| 40 | } // namespace fib |
| 41 | } // namespace ndn |
| 42 | |
| 43 | #endif // NFD_TABLE_FIB_NEXTHOP_HPP |