Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -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_PIT_IN_RECORD_HPP |
| 8 | #define NFD_TABLE_PIT_IN_RECORD_HPP |
| 9 | |
| 10 | #include "pit-face-record.hpp" |
| 11 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 12 | namespace nfd { |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 13 | namespace pit { |
| 14 | |
| 15 | /** \class InRecord |
| 16 | * \brief contains information about an Interest from an incoming face |
| 17 | */ |
| 18 | class InRecord : public FaceRecord |
| 19 | { |
| 20 | public: |
| 21 | explicit |
| 22 | InRecord(shared_ptr<Face> face); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame^] | 23 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 24 | InRecord(const InRecord& other); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame^] | 25 | |
| 26 | void |
| 27 | update(const Interest& interest); |
| 28 | |
| 29 | const Interest& |
| 30 | getInterest() const; |
| 31 | |
| 32 | private: |
| 33 | shared_ptr<Interest> m_interest; |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame^] | 36 | inline const Interest& |
| 37 | InRecord::getInterest() const |
| 38 | { |
| 39 | BOOST_ASSERT(static_cast<bool>(m_interest)); |
| 40 | return *m_interest; |
| 41 | } |
| 42 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 43 | } // namespace pit |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 44 | } // namespace nfd |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 45 | |
| 46 | #endif // NFD_TABLE_PIT_IN_RECORD_HPP |