blob: 5745821957ea4e02773a37aea452f290a2641934 [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
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 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080035class Nocache : public ContentStore {
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070036public:
37 /**
38 * \brief Interface ID
39 *
40 * \return interface ID
41 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080042 static TypeId
43 GetTypeId();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070044
45 /**
46 * @brief Default constructor
47 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080048 Nocache();
49
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070050 /**
51 * @brief Virtual destructor
52 */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080053 virtual ~Nocache();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070054
Alexander Afanasyev772f51b2013-08-01 18:53:25 -070055 virtual Ptr<Data>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080056 Lookup(Ptr<const Interest> interest);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070057
58 virtual bool
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080059 Add(Ptr<const Data> data);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070060
61 virtual void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080062 Print(std::ostream& os) const;
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070063
64 virtual uint32_t
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080065 GetSize() const;
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070066
67 virtual Ptr<cs::Entry>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080068 Begin();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070069
70 virtual Ptr<cs::Entry>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080071 End();
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070072
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080073 virtual Ptr<cs::Entry> Next(Ptr<cs::Entry>);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070074};
75
76} // namespace cs
77} // namespace ndn
78} // namespace ns3
79
80#endif // NDN_CONTENT_STORE_NOCACHE_H