NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::cs::ContentStoreImpl< Policy > Class Template Reference

Base implementation of NDN content store. More...

#include <content-store-impl.hpp>

Inheritance diagram for ns3::ndn::cs::ContentStoreImpl< Policy >:
Collaboration diagram for ns3::ndn::cs::ContentStoreImpl< Policy >:

Public Types

typedef ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< ContentStoreImpl< Policy > >, Entry >, Policy > super
 
typedef EntryImpl< ContentStoreImpl< Policy > > entry
 
typedef void(* CsEntryCallback) (Ptr< const Entry >)
 
- Public Types inherited from ns3::ndn::ContentStore
typedef void(* CacheHitsCallback) (shared_ptr< const Interest >, shared_ptr< const Data >)
 
typedef void(* CacheMissesCallback) (shared_ptr< const Interest >)
 

Public Member Functions

 ContentStoreImpl ()
 
virtual ~ContentStoreImpl ()
 
virtual shared_ptr< DataLookup (shared_ptr< const Interest > interest)
 Find corresponding CS entry for the given interest. More...
 
virtual bool Add (shared_ptr< const Data > data)
 Add a new content to the content store. More...
 
virtual void Print (std::ostream &os) const
 Print out content store entries. More...
 
virtual uint32_t GetSize () const
 Get number of entries in content store. More...
 
virtual Ptr< EntryBegin ()
 Return first element of content store (no order guaranteed) More...
 
virtual Ptr< EntryEnd ()
 Return item next after last (no order guaranteed) More...
 
virtual Ptr< EntryNext (Ptr< Entry >)
 
const super::policy_container & GetPolicy () const
 
super::policy_container & GetPolicy ()
 
- Public Member Functions inherited from ns3::ndn::ContentStore
virtual ~ContentStore ()
 Virtual destructor. More...
 
virtual Ptr< cs::EntryNext (Ptr< cs::Entry >)=0
 Advance the iterator. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::ndn::ContentStore
static TypeId GetTypeId ()
 Interface ID. More...
 
static Ptr< ContentStoreGetContentStore (Ptr< Object > node)
 Static call to cheat python bindings. More...
 

Additional Inherited Members

- Protected Attributes inherited from ns3::ndn::ContentStore
TracedCallback< shared_ptr< const Interest >, shared_ptr< const Data > > m_cacheHitsTrace
 trace of cache hits More...
 
TracedCallback< shared_ptr< const Interest > > m_cacheMissesTrace
 trace of cache misses More...
 

Detailed Description

template<class Policy>
class ns3::ndn::cs::ContentStoreImpl< Policy >

Base implementation of NDN content store.

Definition at line 82 of file content-store-impl.hpp.

Member Typedef Documentation

template<class Policy>
typedef ndnSIM:: trie_with_policy<Name, ndnSIM::smart_pointer_payload_traits<EntryImpl<ContentStoreImpl<Policy> >, Entry>, Policy> ns3::ndn::cs::ContentStoreImpl< Policy >::super

Definition at line 93 of file content-store-impl.hpp.

template<class Policy>
typedef EntryImpl<ContentStoreImpl<Policy> > ns3::ndn::cs::ContentStoreImpl< Policy >::entry

Definition at line 95 of file content-store-impl.hpp.

template<class Policy>
typedef void(* ns3::ndn::cs::ContentStoreImpl< Policy >::CsEntryCallback) (Ptr< const Entry >)

Definition at line 141 of file content-store-impl.hpp.

Constructor & Destructor Documentation

template<class Policy>
ns3::ndn::cs::ContentStoreImpl< Policy >::ContentStoreImpl ( )
inline

Definition at line 100 of file content-store-impl.hpp.

template<class Policy>
virtual ns3::ndn::cs::ContentStoreImpl< Policy >::~ContentStoreImpl ( )
inlinevirtual

Definition at line 101 of file content-store-impl.hpp.

Member Function Documentation

template<class Policy >
TypeId ns3::ndn::cs::ContentStoreImpl< Policy >::GetTypeId ( void  )
static

Definition at line 167 of file content-store-impl.hpp.

template<class Policy >
shared_ptr< Data > ns3::ndn::cs::ContentStoreImpl< Policy >::Lookup ( shared_ptr< const Interest interest)
inlinevirtual

Find corresponding CS entry for the given interest.

Parameters
interestInterest for which matching content store entry will be searched

If an entry is found, it is promoted to the top of most recent used entries index,

See also
m_contentStore

Implements ns3::ndn::ContentStore.

Definition at line 206 of file content-store-impl.hpp.

template<class Policy >
bool ns3::ndn::cs::ContentStoreImpl< Policy >::Add ( shared_ptr< const Data data)
inlinevirtual
template<class Policy >
uint32_t ns3::ndn::cs::ContentStoreImpl< Policy >::GetSize ( ) const
virtual

Get number of entries in content store.

Implements ns3::ndn::ContentStore.

Definition at line 283 of file content-store-impl.hpp.

template<class Policy >
Ptr< Entry > ns3::ndn::cs::ContentStoreImpl< Policy >::Begin ( )
virtual

Return first element of content store (no order guaranteed)

Implements ns3::ndn::ContentStore.

Definition at line 290 of file content-store-impl.hpp.

template<class Policy >
Ptr< Entry > ns3::ndn::cs::ContentStoreImpl< Policy >::End ( )
virtual

Return item next after last (no order guaranteed)

Implements ns3::ndn::ContentStore.

Definition at line 307 of file content-store-impl.hpp.

template<class Policy >
Ptr< Entry > ns3::ndn::cs::ContentStoreImpl< Policy >::Next ( Ptr< Entry from)
virtual
template<class Policy>
const super::policy_container& ns3::ndn::cs::ContentStoreImpl< Policy >::GetPolicy ( ) const
inline

Definition at line 129 of file content-store-impl.hpp.

template<class Policy>
super::policy_container& ns3::ndn::cs::ContentStoreImpl< Policy >::GetPolicy ( )
inline

Definition at line 135 of file content-store-impl.hpp.


The documentation for this class was generated from the following file: