NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::FaceContainer Class Reference

A pool for Ndn faces. More...

#include <ndn-face-container.hpp>

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

Public Types

typedef Container::const_iterator Iterator
 Iterator over FaceContainer. More...
 

Public Member Functions

 FaceContainer ()
 Create an empty FaceContainer. More...
 
 FaceContainer (const FaceContainer &other)
 Copy constructor for FaceContainer. More...
 
FaceContaineroperator= (const FaceContainer &other)
 Copy operator for FaceContainer. More...
 
void Add (shared_ptr< Face > face)
 Add an entry to the container. 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...
 
shared_ptr< FaceGet (size_t pos) const
 Get a Face 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
ndn::StackHelper

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

Member Typedef Documentation

◆ Iterator

typedef Container::const_iterator ns3::ndn::FaceContainer::Iterator

Iterator over FaceContainer.

Definition at line 48 of file ndn-face-container.hpp.

Constructor & Destructor Documentation

◆ FaceContainer() [1/2]

ns3::ndn::FaceContainer::FaceContainer ( )
default

Create an empty FaceContainer.

◆ FaceContainer() [2/2]

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

Copy constructor for FaceContainer.

Calls AddAll method

See also
FaceContainer::AddAll

Definition at line 29 of file ndn-face-container.cpp.

References AddAll().

Member Function Documentation

◆ operator=()

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 35 of file ndn-face-container.cpp.

References AddAll().

◆ Add()

void ns3::ndn::FaceContainer::Add ( shared_ptr< Face face)

Add an entry to the container.

Parameters
facea smart pointer to a Face-derived object

Definition at line 80 of file ndn-face-container.cpp.

◆ AddAll() [1/2]

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

Add all entries from other container.

Parameters
othersmart pointer to a container

Definition at line 44 of file ndn-face-container.cpp.

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

◆ AddAll() [2/2]

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

Add all entries from other container.

Parameters
othercontainer

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

◆ Begin()

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 62 of file ndn-face-container.cpp.

◆ End()

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 68 of file ndn-face-container.cpp.

◆ GetN()

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 74 of file ndn-face-container.cpp.

◆ Get()

shared_ptr< Face > ns3::ndn::FaceContainer::Get ( size_t  pos) const

Get a Face stored in the container.

Parameters
posindex of the Face in the container
Exceptions
std::out_of_rangeif !(pos < GetN()).

Definition at line 86 of file ndn-face-container.cpp.


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