22 #ifndef NDN_INTEREST_FILTER_TABLE_HPP 
   23 #define NDN_INTEREST_FILTER_TABLE_HPP 
   25 #include <ndn-cpp/face.hpp> 
   51       (uint64_t interestFilterId,
 
   52        const ptr_lib::shared_ptr<const InterestFilter>& filter,
 
   54     : interestFilterId_(interestFilterId), filter_(filter),
 
   55       prefix_(
new Name(filter->getPrefix())), onInterest_(onInterest), face_(face)
 
   70     const ptr_lib::shared_ptr<const InterestFilter>&
 
   79     const ptr_lib::shared_ptr<const Name>&
 
   97     uint64_t interestFilterId_;  
 
   98     ptr_lib::shared_ptr<const InterestFilter> filter_;
 
   99     ptr_lib::shared_ptr<const Name> prefix_;
 
  114     (uint64_t interestFilterId,
 
  115      const ptr_lib::shared_ptr<const InterestFilter>& filterCopy,
 
  118     table_.push_back(ptr_lib::make_shared<Entry>
 
  119       (interestFilterId, filterCopy, onInterest, face));
 
  133       std::vector<ptr_lib::shared_ptr<Entry> > &matchedFilters);
 
  146   std::vector<ptr_lib::shared_ptr<Entry> > table_;
 
const ptr_lib::shared_ptr< const Name > & getPrefix()
Get the prefix from the filter as a shared_ptr. 
Definition: interest-filter-table.hpp:80
 
Copyright (C) 2013-2016 Regents of the University of California. 
Definition: common.hpp:35
 
The Face class provides the main methods for NDN communication. 
Definition: face.hpp:86
 
An Entry holds an interestFilterId, an InterestFilter and the OnInterestCallback with its related Fac...
Definition: interest-filter-table.hpp:39
 
A Name holds an array of Name::Component and represents an NDN name. 
Definition: name.hpp:40
 
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. 
Definition: interest-filter-table.hpp:51
 
An Interest holds a Name and other fields for an interest. 
Definition: interest.hpp:41
 
func_lib::function< void(const ptr_lib::shared_ptr< const Name > &, const ptr_lib::shared_ptr< const Interest > &, Face &, uint64_t, const ptr_lib::shared_ptr< const InterestFilter > &)> OnInterestCallback
An OnInterestCallback function object is used to pass a callback to setInterestFilter and optionally ...
Definition: face.hpp:67
 
const OnInterestCallback & getOnInterest()
Get the OnInterestCallback given to the constructor. 
Definition: interest-filter-table.hpp:87
 
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...
Definition: interest-filter-table.cpp:33
 
An InterestFilterTable is an internal class to hold a list of entries with an interest Filter and its...
Definition: interest-filter-table.hpp:33
 
uint64_t getInterestFilterId()
Return the interestFilterId given to the constructor. 
Definition: interest-filter-table.hpp:64
 
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. 
Definition: interest-filter-table.hpp:114
 
void unsetInterestFilter(uint64_t interestFilterId)
Remove the interest filter entry which has the interestFilterId from the interest filter table...
Definition: interest-filter-table.cpp:44
 
const ptr_lib::shared_ptr< const InterestFilter > & getFilter()
Get the InterestFilter given to the constructor. 
Definition: interest-filter-table.hpp:71
 
Face & getFace()
Get the Face given to the constructor. 
Definition: interest-filter-table.hpp:94