blob: 019926bab30fab68783f0a1a72e14a60da3cd8c2 [file] [log] [blame]
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2011-2015 Regents of the University of California.
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -07004 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08005 * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
6 * contributors.
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -07007 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08008 * ndnSIM is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070011 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -080012 * ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070015 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -080016 * You should have received a copy of the GNU General Public License along with
17 * ndnSIM, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 **/
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070019
20#ifndef NDN_CONTENT_STORE_NOCACHE_H
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080021#define NDN_CONTENT_STORE_NOCACHE_H
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070022
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070023#include "ns3/ndnSIM/model/ndn-common.hpp"
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 */
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
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070055 virtual shared_ptr<Data>
56 Lookup(shared_ptr<const Interest> interest);
Alexander Afanasyev8ade0be2013-06-04 10:06:06 -070057
58 virtual bool
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070059 Add(shared_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