NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
content-store-nocache.h
1 /* -*- 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 
27 namespace ns3 {
28 namespace ndn {
29 namespace cs {
30 
35 class Nocache : public ContentStore
36 {
37 public:
43  static
44  TypeId GetTypeId ();
45 
49  Nocache ();
50 
54  virtual
55  ~Nocache ();
56 
57  virtual Ptr<Data>
58  Lookup (Ptr<const Interest> interest);
59 
60  virtual bool
61  Add (Ptr<const Data> data);
62 
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
Base class for NDN content store.
virtual ~Nocache()
Virtual destructor.
virtual Ptr< cs::Entry > End()
Return item next after last (no order guaranteed)
virtual bool Add(Ptr< const Data > data)
Add a new content to the content store.
virtual Ptr< cs::Entry > Begin()
Return first element of content store (no order guaranteed)
Implementation of ContentStore that completely disables caching.
virtual uint32_t GetSize() const
Get number of entries in content store.
Nocache()
Default constructor.
virtual Ptr< Data > Lookup(Ptr< const Interest > interest)
Find corresponding CS entry for the given interest.
static TypeId GetTypeId()
Interface ID.
virtual void Print(std::ostream &os) const
Print out content store entries.