NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
interest-filter.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_INTEREST_FILTER_HPP
23
#define NDN_INTEREST_FILTER_HPP
24
25
#include "
name.hpp
"
26
27
namespace
ndn
{
28
29
class
RegexPatternListMatcher;
30
35
class
InterestFilter
36
{
37
public
:
38
class
Error
:
public
std::runtime_error
39
{
40
public
:
41
explicit
42
Error
(
const
std::string& what)
43
:
std
::runtime_error(what)
44
{
45
}
46
};
47
55
InterestFilter
(
const
Name
& prefix);
56
65
InterestFilter
(
const
char
* prefixUri);
66
75
InterestFilter
(
const
std::string& prefixUri);
76
95
InterestFilter
(
const
Name
& prefix,
const
std::string& regexFilter);
96
102
operator
const
Name
&()
const
;
103
107
bool
108
doesMatch
(
const
Name
&
name
)
const
;
109
110
const
Name
&
111
getPrefix
()
const
112
{
113
return
m_prefix;
114
}
115
116
bool
117
hasRegexFilter
()
const
118
{
119
return
m_regexFilter !=
nullptr
;
120
}
121
122
const
RegexPatternListMatcher
&
123
getRegexFilter
()
const
124
{
125
return
*m_regexFilter;
126
}
127
128
private
:
129
Name
m_prefix;
130
shared_ptr<RegexPatternListMatcher> m_regexFilter;
131
};
132
133
std::ostream&
134
operator<<
(std::ostream& os,
const
InterestFilter
& filter);
135
136
}
// namespace ndn
137
138
#endif // NDN_INTEREST_FILTER_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::InterestFilter::getPrefix
const Name & getPrefix() const
Definition:
interest-filter.hpp:111
ndn::RegexPatternListMatcher
Definition:
regex-pattern-list-matcher.hpp:35
ndn::operator<<
std::ostream & operator<<(std::ostream &os, const Data &data)
Definition:
data.cpp:320
ndn::InterestFilter
declares the set of Interests a producer can serve, which starts with a name prefix, plus an optional regular expression
Definition:
interest-filter.hpp:35
std
STL namespace.
ndn::InterestFilter::Error::Error
Error(const std::string &what)
Definition:
interest-filter.hpp:42
ndn::InterestFilter::doesMatch
bool doesMatch(const Name &name) const
Check if specified Interest name matches the filter.
Definition:
interest-filter.cpp:58
ndn::InterestFilter::getRegexFilter
const RegexPatternListMatcher & getRegexFilter() const
Definition:
interest-filter.hpp:123
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::InterestFilter::hasRegexFilter
bool hasRegexFilter() const
Definition:
interest-filter.hpp:117
ndn::InterestFilter::InterestFilter
InterestFilter(const Name &prefix)
Construct an InterestFilter to match Interests by prefix.
Definition:
interest-filter.cpp:27
name.hpp
ndn::name
Definition:
name-component.cpp:36
ndn::InterestFilter::Error
Definition:
interest-filter.hpp:38
ndnSIM
ndn-cxx
src
interest-filter.hpp
Generated on Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13