model: Another set of refactoring/renaming to make code compile (not tested yet)
Refs #1005 (http://redmine.named-data.net/)
diff --git a/model/cs/content-store-impl.h b/model/cs/content-store-impl.h
index 9cd934e..69fa00e 100644
--- a/model/cs/content-store-impl.h
+++ b/model/cs/content-store-impl.h
@@ -156,7 +156,7 @@
}
template<class Policy>
-Ptr<const ContentObject>
+Ptr<ContentObject>
ContentStoreImpl<Policy>::Lookup (Ptr<const Interest> interest)
{
NS_LOG_FUNCTION (this << interest->GetName ());
@@ -168,7 +168,7 @@
{
this->m_cacheHitsTrace (interest, node->payload ()->GetData ());
- Ptr<ContentObject> copy = Create<ContentObject> (node->payload ()->GetData ());
+ Ptr<ContentObject> copy = Create<ContentObject> (*node->payload ()->GetData ());
ConstCast<Packet> (copy->GetPayload ())->RemoveAllPacketTags ();
return copy;
}
diff --git a/model/cs/content-store-with-freshness.h b/model/cs/content-store-with-freshness.h
index 3ba871c..22242b9 100644
--- a/model/cs/content-store-with-freshness.h
+++ b/model/cs/content-store-with-freshness.h
@@ -46,7 +46,7 @@
Print (std::ostream &os) const;
virtual inline bool
- Add (Ptr<const ContentObject> header, Ptr<const Packet> packet);
+ Add (Ptr<const ContentObject> data);
private:
inline void
@@ -95,7 +95,7 @@
bool ok = super::Add (data);
if (!ok) return false;
- NS_LOG_DEBUG (header->GetName () << " added to cache");
+ NS_LOG_DEBUG (data->GetName () << " added to cache");
RescheduleCleaning ();
return true;
}
diff --git a/model/cs/custom-policies/freshness-policy.h b/model/cs/custom-policies/freshness-policy.h
index 5fa2a34..b85635e 100644
--- a/model/cs/custom-policies/freshness-policy.h
+++ b/model/cs/custom-policies/freshness-policy.h
@@ -103,7 +103,7 @@
insert (typename parent_trie::iterator item)
{
// get_time (item) = Simulator::Now ();
- Time freshness = item->payload ()->GetHeader ()->GetFreshness ();
+ Time freshness = item->payload ()->GetData ()->GetFreshness ();
if (!freshness.IsZero ())
{
get_freshness (item) = Simulator::Now () + freshness;
@@ -125,7 +125,7 @@
inline void
erase (typename parent_trie::iterator item)
{
- if (!item->payload ()->GetHeader ()->GetFreshness ().IsZero ())
+ if (!item->payload ()->GetData ()->GetFreshness ().IsZero ())
{
// erase only if freshness is non zero (otherwise an item is not in the policy
policy_container::erase (policy_container::s_iterator_to (*item));
diff --git a/model/cs/ndn-content-store.cc b/model/cs/ndn-content-store.cc
index cfe362e..f1c25b7 100644
--- a/model/cs/ndn-content-store.cc
+++ b/model/cs/ndn-content-store.cc
@@ -69,7 +69,7 @@
const Name&
Entry::GetName () const
{
- return m_header->GetName ();
+ return m_data->GetName ();
}
Ptr<const ContentObject>