NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
in-memory-storage-entry.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
23 #define NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
24 
25 #include "../common.hpp"
26 #include "../interest.hpp"
27 #include "../data.hpp"
28 
29 namespace ndn {
30 namespace util {
31 
34 class InMemoryStorageEntry : noncopyable
35 {
36 public:
39  void
40  release();
41 
44  const Name&
45  getName() const
46  {
47  return m_dataPacket->getName();
48  }
49 
53  const Name&
54  getFullName() const
55  {
56  return m_dataPacket->getFullName();
57  }
58 
59 
62  const Data&
63  getData() const
64  {
65  return *m_dataPacket;
66  }
67 
68 
71  void
72  setData(const Data& data);
73 
74 private:
75  shared_ptr<const Data> m_dataPacket;
76 };
77 
78 } // namespace util
79 } // namespace ndn
80 
81 #endif // NDN_UTIL_IN_MEMORY_STORAGE_ENTRY_HPP
Copyright (c) 2011-2015 Regents of the University of California.
void release()
Releases reference counts on shared objects.
const Data & getData() const
Returns the Data packet stored in the in-memory storage entry.
const Name & getName() const
Returns the name of the Data packet stored in the in-memory storage entry.
const Name & getFullName() const
Returns the full name (including implicit digest) of the Data packet stored in the in-memory storage ...
Represents an in-memory storage entry.
Name abstraction to represent an absolute name.
Definition: name.hpp:46
represents a Data packet
Definition: data.hpp:39
void setData(const Data &data)
Changes the content of in-memory storage entry.