22 #ifndef NDN_CXX_INTEREST_FILTER_HPP
23 #define NDN_CXX_INTEREST_FILTER_HPP
29 class RegexPatternListMatcher;
39 class Error :
public std::runtime_error
42 using std::runtime_error::runtime_error;
99 operator const Name&()
const;
116 return m_regexFilter !=
nullptr;
122 return *m_regexFilter;
131 return m_allowsLoopback;
143 m_allowsLoopback = wantLoopback;
149 shared_ptr<RegexPatternListMatcher> m_regexFilter;
150 bool m_allowsLoopback =
true;
154 operator<<(std::ostream& os,
const InterestFilter& filter);
Declares the set of Interests a producer can serve.
const Name & getPrefix() const
bool hasRegexFilter() const
bool allowsLoopback() const noexcept
Get whether Interest loopback is allowed.
InterestFilter(const Name &prefix)
Construct an InterestFilter to match Interests by prefix.
bool doesMatch(const Name &name) const
Check if specified Interest name matches the filter.
const RegexPatternListMatcher & getRegexFilter() const
InterestFilter & allowLoopback(bool wantLoopback) noexcept
Set whether Interest loopback is allowed.
Represents an absolute name.
std::ostream & operator<<(std::ostream &os, const Data &data)