NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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 EntryImpl<ContentStoreImpl<Policy> > ns3::ndn::cs::ContentStoreImpl< Policy >::entry

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

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.

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 >
bool ns3::ndn::cs::ContentStoreImpl< Policy >::Add ( shared_ptr< const Data data)
inlinevirtual

Add a new content to the content store.

Parameters
headerFully parsed Data
packetFully formed Ndn packet to add to content store (will be copied and stripped down of headers)
Returns
true if an existing entry was updated, false otherwise

Implements ns3::ndn::ContentStore.

Reimplemented in ns3::ndn::cs::ContentStoreWithFreshness< Policy >, ns3::ndn::cs::ContentStoreWithFreshness< fifo_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< lfu_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< random_policy_traits >, and ns3::ndn::cs::ContentStoreWithFreshness< lru_policy_traits >.

Definition at line 230 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 287 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 304 of file content-store-impl.hpp.

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.

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 280 of file content-store-impl.hpp.

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

Definition at line 165 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 203 of file content-store-impl.hpp.

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

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


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