blob: 79d12848af894a233a5d877e2f8ece9d727496cb [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
25#include "ns3/ndn-content-store.h"
26
27namespace ns3 {
28namespace ndn {
29namespace cs {
30
31/**
32 * \ingroup ndn
33 * \brief Implementation of ContentStore that completely disables caching
34 */
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 Afanasyevb989b122013-07-10 17:15:46 -070057 virtual Ptr<ContentObject>
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070058 Lookup (Ptr<const Interest> interest);
59
60 virtual bool
Alexander Afanasyevb989b122013-07-10 17:15:46 -070061 Add (Ptr<const ContentObject> 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