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 | #include "fib-nexthop.hpp" |
| 8 | |
| 9 | namespace ndn { |
| 10 | namespace fib { |
| 11 | |
| 12 | NextHop::NextHop(shared_ptr<Face> face) |
| 13 | : m_face(face), m_cost(0) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | NextHop::NextHop(const NextHop& other) |
| 18 | : m_face(other.m_face), m_cost(other.m_cost) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | shared_ptr<Face> |
| 23 | NextHop::getFace() const |
| 24 | { |
| 25 | return m_face; |
| 26 | } |
| 27 | |
| 28 | void |
| 29 | NextHop::setCost(int32_t cost) |
| 30 | { |
| 31 | m_cost = cost; |
| 32 | } |
| 33 | |
| 34 | int32_t |
| 35 | NextHop::getCost() const |
| 36 | { |
| 37 | return m_cost; |
| 38 | } |
| 39 | |
| 40 | } // namespace fib |
| 41 | } // namespace ndn |