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

An InterestFilterTable is an internal class to hold a list of entries with an interest Filter and its OnInterestCallback. More...

#include <interest-filter-table.hpp>

Classes

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

Public Member Functions

void setInterestFilter (uint64_t interestFilterId, const ptr_lib::shared_ptr< const InterestFilter > &filterCopy, const OnInterestCallback &onInterest, Face *face)
 Add a new entry to the table. More...
 
void getMatchedFilters (const Interest &interest, std::vector< ptr_lib::shared_ptr< Entry > > &matchedFilters)
 Find all entries from the interest filter table where the interest conforms to the entry's filter, and add to the matchedFilters list. More...
 
void unsetInterestFilter (uint64_t interestFilterId)
 Remove the interest filter entry which has the interestFilterId from the interest filter table. More...
 

Detailed Description

An InterestFilterTable is an internal class to hold a list of entries with an interest Filter and its OnInterestCallback.

Member Function Documentation

void ndn::InterestFilterTable::getMatchedFilters ( const Interest interest,
std::vector< ptr_lib::shared_ptr< Entry > > &  matchedFilters 
)

Find all entries from the interest filter table where the interest conforms to the entry's filter, and add to the matchedFilters list.

Parameters
interestThe interest which may match the filter in multiple entries.
matchedFiltersAdd each matching InterestFilterTable.Entry from the interest filter table. The caller should pass in a reference to an empty vector.
void ndn::InterestFilterTable::setInterestFilter ( uint64_t  interestFilterId,
const ptr_lib::shared_ptr< const InterestFilter > &  filterCopy,
const OnInterestCallback onInterest,
Face face 
)
inline

Add a new entry to the table.

Parameters
interestFilterIdThe ID from Node.getNextEntryId().
filterThe InterestFilter for this entry.
onInterestThe callback to call.
faceThe face on which was called registerPrefix or setInterestFilter which is passed to the onInterest callback.
void ndn::InterestFilterTable::unsetInterestFilter ( uint64_t  interestFilterId)

Remove the interest filter entry which has the interestFilterId from the interest filter table.

This does not affect another interest filter with a different interestFilterId, even if it has the same prefix name. If there is no entry with the interestFilterId, do nothing.

Parameters
interestFilterIdThe ID returned from setInterestFilter.

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