blob: ac7ced7959017b2c33e4366b5d755b90e1bae31f [file] [log] [blame]
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Alexander Afanasyev
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
20 */
21
22#ifndef NDN_CONTENT_STORE_NOCACHE_H
23#define NDN_CONTENT_STORE_NOCACHE_H
24
Alexander Afanasyev0c395372014-12-20 15:54:02 -080025#include "ns3/ndnSIM/model/cs/ndn-content-store.hpp"
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070026
27namespace ns3 {
28namespace ndn {
29namespace cs {
30
31/**
Alexander Afanasyev79206512013-07-27 16:49:12 -070032 * @ingroup ndn-cs
33 * @brief Implementation of ContentStore that completely disables caching
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070034 */
35class Nocache : public ContentStore
36{
37public:
38 /**
39 * \brief Interface ID
40 *
41 * \return interface ID
42 */
43 static
44 TypeId GetTypeId ();
45
46 /**
47 * @brief Default constructor
48 */
49 Nocache ();
50
51 /**
52 * @brief Virtual destructor
53 */
54 virtual
55 ~Nocache ();
56
Alexander Afanasyev772f51b2013-08-01 18:53:25 -070057 virtual Ptr<Data>
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070058 Lookup (Ptr<const Interest> interest);
59
60 virtual bool
Alexander Afanasyev772f51b2013-08-01 18:53:25 -070061 Add (Ptr<const Data> data);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070062
63 virtual void
64 Print (std::ostream &os) const;
65
66 virtual uint32_t
67 GetSize () const;
68
69 virtual Ptr<cs::Entry>
70 Begin ();
71
72 virtual Ptr<cs::Entry>
73 End ();
74
75 virtual Ptr<cs::Entry>
76 Next (Ptr<cs::Entry>);
77
78};
79
80} // namespace cs
81} // namespace ndn
82} // namespace ns3
83
84#endif // NDN_CONTENT_STORE_NOCACHE_H