model+cs: Now it is possible to get pointer to ContentStore from cs::Entry
In some cases it is desirable to know which ContentStore (=on which
Node) a particular cs::Entry belongs to. Now it is possible to
accomplish this task using cs::Entry::GetContentStore method.
diff --git a/model/cs/content-store-impl.h b/model/cs/content-store-impl.h
index cd277cc..ffbc925 100644
--- a/model/cs/content-store-impl.h
+++ b/model/cs/content-store-impl.h
@@ -44,8 +44,8 @@
typedef Entry base_type;
public:
- EntryImpl (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
- : Entry (header, packet)
+ EntryImpl (Ptr<ContentStore> cs, Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
+ : Entry (cs, header, packet)
, item_ (0)
{
}
@@ -187,7 +187,7 @@
{
NS_LOG_FUNCTION (this << header->GetName ());
- Ptr< entry > newEntry = Create< entry > (header, packet);
+ Ptr< entry > newEntry = Create< entry > (this, header, packet);
std::pair< typename super::iterator, bool > result = super::insert (header->GetName (), newEntry);
if (result.first != super::end ())