blob: 3dd7420a80f9e98f59ac5555fde00ca734e00f03 [file] [log] [blame]
Junxiao Shicbba04c2014-01-26 14:21:22 -07001/* -*- 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 Afanasyev18bbf812014-01-29 01:40:23 -080012namespace nfd {
Junxiao Shicbba04c2014-01-26 14:21:22 -070013namespace pit {
14
15/** \class InRecord
16 * \brief contains information about an Interest from an incoming face
17 */
18class InRecord : public FaceRecord
19{
20public:
21 explicit
22 InRecord(shared_ptr<Face> face);
Junxiao Shif3c07812014-03-11 21:48:49 -070023
Junxiao Shicbba04c2014-01-26 14:21:22 -070024 InRecord(const InRecord& other);
Junxiao Shif3c07812014-03-11 21:48:49 -070025
26 void
27 update(const Interest& interest);
28
29 const Interest&
30 getInterest() const;
31
32private:
33 shared_ptr<Interest> m_interest;
Junxiao Shicbba04c2014-01-26 14:21:22 -070034};
35
Junxiao Shif3c07812014-03-11 21:48:49 -070036inline const Interest&
37InRecord::getInterest() const
38{
39 BOOST_ASSERT(static_cast<bool>(m_interest));
40 return *m_interest;
41}
42
Junxiao Shicbba04c2014-01-26 14:21:22 -070043} // namespace pit
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080044} // namespace nfd
Junxiao Shicbba04c2014-01-26 14:21:22 -070045
46#endif // NFD_TABLE_PIT_IN_RECORD_HPP