Content Store extension. Now it supports the same enumeration interface available for PIT and FIB
diff --git a/model/cs/ndn-content-store.h b/model/cs/ndn-content-store.h
index 963c7bc..047fd81 100644
--- a/model/cs/ndn-content-store.h
+++ b/model/cs/ndn-content-store.h
@@ -162,6 +162,41 @@
virtual void
Print (std::ostream &os) const = 0;
+
+ /**
+ * @brief Get number of entries in content store
+ */
+ virtual uint32_t
+ GetSize () const = 0;
+
+ /**
+ * @brief Return first element of content store (no order guaranteed)
+ */
+ virtual Ptr<cs::Entry>
+ Begin () = 0;
+
+ /**
+ * @brief Return item next after last (no order guaranteed)
+ */
+ virtual Ptr<cs::Entry>
+ End () = 0;
+
+ /**
+ * @brief Advance the iterator
+ */
+ virtual Ptr<cs::Entry>
+ Next (Ptr<cs::Entry>) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @brief Static call to cheat python bindings
+ */
+ static inline Ptr<ContentStore>
+ GetContentStore (Ptr<Object> node);
+
protected:
TracedCallback<Ptr<const InterestHeader>,
Ptr<const ContentObjectHeader> > m_cacheHitsTrace; ///< @brief trace of cache hits
@@ -176,6 +211,13 @@
return os;
}
+inline Ptr<ContentStore>
+ContentStore::GetContentStore (Ptr<Object> node)
+{
+ return node->GetObject<ContentStore> ();
+}
+
+
} // namespace ndn
} // namespace ns3