NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::FaceContainer Class Reference

A pool for Ndn faces. More...

#include <ndn-face-container.h>

Inheritance diagram for ns3::ndn::FaceContainer:
Collaboration diagram for ns3::ndn::FaceContainer:

Public Types

typedef Container::const_iterator Iterator
 Iterator over FaceContainer.
 

Public Member Functions

 FaceContainer ()
 Create an empty FaceContainer.
 
 FaceContainer (const FaceContainer &other)
 Copy constructor for FaceContainer. More...
 
FaceContaineroperator= (const FaceContainer &other)
 Copy operator for FaceContainer. More...
 
void AddAll (Ptr< FaceContainer > other)
 Add all entries from other container. More...
 
void AddAll (const FaceContainer &other)
 Add all entries from other container. More...
 
Iterator Begin () const
 Get an iterator which refers to the first pair in the container. More...
 
Iterator End () const
 Get an iterator which indicates past-the-last Node in the container. More...
 
uint32_t GetN () const
 Get the number of faces stored in this container. More...
 
void Add (const Ptr< Face > &face)
 Set a metric for all faces in the container. More...
 
Ptr< FaceGet (Iterator i) const
 Get a smart pointer to Face-derived object stored in the container. More...
 

Detailed Description

A pool for Ndn faces.

Provides tools to perform basic manipulation on faces, such as setting metrics and states on faces

See also
NdnStackHelper

Definition at line 43 of file ndn-face-container.h.

Constructor & Destructor Documentation

ns3::ndn::FaceContainer::FaceContainer ( const FaceContainer other)

Copy constructor for FaceContainer.

Calls AddAll method

See also
FaceContainer::AddAll

Definition at line 34 of file ndn-face-container.cc.

References AddAll().

Member Function Documentation

void ns3::ndn::FaceContainer::Add ( const Ptr< Face > &  face)

Set a metric for all faces in the container.

Parameters
metricvalue of metric to assign to all faces in the container Add an entry to the container
facea smart pointer to a Face-derived object
See also
Face

Definition at line 92 of file ndn-face-container.cc.

void ns3::ndn::FaceContainer::AddAll ( Ptr< FaceContainer other)

Add all entries from other container.

Parameters
othersmart pointer to a container

Definition at line 50 of file ndn-face-container.cc.

Referenced by FaceContainer(), and operator=().

void ns3::ndn::FaceContainer::AddAll ( const FaceContainer other)

Add all entries from other container.

Parameters
othercontainer

Definition at line 56 of file ndn-face-container.cc.

FaceContainer::Iterator ns3::ndn::FaceContainer::Begin ( void  ) const

Get an iterator which refers to the first pair in the container.

Returns
an iterator which refers to the first pair in the container.

Definition at line 63 of file ndn-face-container.cc.

FaceContainer::Iterator ns3::ndn::FaceContainer::End ( void  ) const

Get an iterator which indicates past-the-last Node in the container.

Returns
an iterator which indicates an ending condition for a loop.

Definition at line 69 of file ndn-face-container.cc.

Ptr< Face > ns3::ndn::FaceContainer::Get ( FaceContainer::Iterator  i) const

Get a smart pointer to Face-derived object stored in the container.

Parameters
ithe iterator corresponding to the requested object

This method is redundant and simple dereferencing of the iterator should be used instead

See also
Face

Definition at line 98 of file ndn-face-container.cc.

uint32_t ns3::ndn::FaceContainer::GetN ( void  ) const

Get the number of faces stored in this container.

Returns
the number of faces stored in this container

Definition at line 75 of file ndn-face-container.cc.

FaceContainer & ns3::ndn::FaceContainer::operator= ( const FaceContainer other)

Copy operator for FaceContainer.

Empties vector and calls AddAll method

All previously obtained iterators (Begin() and End()) will be invalidated

See also
FaceContainer::AddAll

Definition at line 40 of file ndn-face-container.cc.

References AddAll().


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