blob: bf271cbe5a2e35b5ec82c63a35eb9409c1964e5e [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
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080023#define NDN_CONTENT_STORE_NOCACHE_H
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070024
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070025#include "ns3/ndnSIM/model/ndn-common.hpp"
26
Alexander Afanasyev0c395372014-12-20 15:54:02 -080027#include "ns3/ndnSIM/model/cs/ndn-content-store.hpp"
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070028
29namespace ns3 {
30namespace ndn {
31namespace cs {
32
33/**
Alexander Afanasyev79206512013-07-27 16:49:12 -070034 * @ingroup ndn-cs
35 * @brief Implementation of ContentStore that completely disables caching
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070036 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080037class Nocache : public ContentStore {
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070038public:
39 /**
40 * \brief Interface ID
41 *
42 * \return interface ID
43 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080044 static TypeId
45 GetTypeId();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070046
47 /**
48 * @brief Default constructor
49 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080050 Nocache();
51
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070052 /**
53 * @brief Virtual destructor
54 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080055 virtual ~Nocache();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070056
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070057 virtual shared_ptr<Data>
58 Lookup(shared_ptr<const Interest> interest);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070059
60 virtual bool
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070061 Add(shared_ptr<const Data> data);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070062
63 virtual void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080064 Print(std::ostream& os) const;
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070065
66 virtual uint32_t
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080067 GetSize() const;
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070068
69 virtual Ptr<cs::Entry>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080070 Begin();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070071
72 virtual Ptr<cs::Entry>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080073 End();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070074
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080075 virtual Ptr<cs::Entry> Next(Ptr<cs::Entry>);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070076};
77
78} // namespace cs
79} // namespace ndn
80} // namespace ns3
81
82#endif // NDN_CONTENT_STORE_NOCACHE_H