Public Member Functions | List of all members
ndn::InterestFilterTable::Entry Class Reference

An Entry holds an interestFilterId, an InterestFilter and the OnInterestCallback with its related Face. More...

#include <interest-filter-table.hpp>

Public Member Functions

 Entry (uint64_t interestFilterId, const ptr_lib::shared_ptr< const InterestFilter > &filter, const OnInterestCallback &onInterest, Face *face)
 Create a new Entry with the given values. More...
 
uint64_t getInterestFilterId ()
 Return the interestFilterId given to the constructor. More...
 
const ptr_lib::shared_ptr< const InterestFilter > & getFilter ()
 Get the InterestFilter given to the constructor. More...
 
const ptr_lib::shared_ptr< const Name > & getPrefix ()
 Get the prefix from the filter as a shared_ptr. More...
 
const OnInterestCallbackgetOnInterest ()
 Get the OnInterestCallback given to the constructor. More...
 
FacegetFace ()
 Get the Face given to the constructor. More...
 

Detailed Description

An Entry holds an interestFilterId, an InterestFilter and the OnInterestCallback with its related Face.

Constructor & Destructor Documentation

ndn::InterestFilterTable::Entry::Entry ( uint64_t  interestFilterId,
const ptr_lib::shared_ptr< const InterestFilter > &  filter,
const OnInterestCallback onInterest,
Face face 
)
inline

Create a new Entry with the given values.

Parameters
interestFilterIdThe ID from Node::getNextEntryId().
filterA shared_ptr for the InterestFilter for this entry.
onInterestA function object to call when a matching data packet is received.
faceThe face on which was called registerPrefix or setInterestFilter which is passed to the onInterest callback.

Member Function Documentation

Face& ndn::InterestFilterTable::Entry::getFace ( )
inline

Get the Face given to the constructor.

Returns
The Face.
const ptr_lib::shared_ptr<const InterestFilter>& ndn::InterestFilterTable::Entry::getFilter ( )
inline

Get the InterestFilter given to the constructor.

Returns
The InterestFilter.
uint64_t ndn::InterestFilterTable::Entry::getInterestFilterId ( )
inline

Return the interestFilterId given to the constructor.

Returns
The interestFilterId.
const OnInterestCallback& ndn::InterestFilterTable::Entry::getOnInterest ( )
inline

Get the OnInterestCallback given to the constructor.

Returns
The OnInterest callback.
const ptr_lib::shared_ptr<const Name>& ndn::InterestFilterTable::Entry::getPrefix ( )
inline

Get the prefix from the filter as a shared_ptr.

We keep this cached value so that we don't have to copy the name to pass a shared_ptr each time we call the OnInterestCallback.

Returns
The filter's prefix.

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