24 #ifndef NDN_UTIL_REGEX_REGEX_MATCHER_HPP 25 #define NDN_UTIL_REGEX_REGEX_MATCHER_HPP 35 class Error :
public std::runtime_error
38 using std::runtime_error::runtime_error;
52 shared_ptr<RegexBackrefManager> backrefManager =
nullptr);
58 match(
const Name& name,
size_t offset,
size_t len);
64 const std::vector<name::Component>&
85 recursiveMatch(
size_t matcherNo,
const Name& name,
size_t offset,
size_t len);
100 #endif // NDN_UTIL_REGEX_REGEX_MATCHER_HPP virtual void compile()=0
Compile the regular expression to generate the more matchers when necessary.
std::ostream & operator<<(std::ostream &os, const Data &data)
const RegexExprType m_type
const std::vector< name::Component > & getMatchResult() const
get the matched name components
shared_ptr< RegexBackrefManager > m_backrefManager
std::vector< shared_ptr< RegexMatcher > > m_matchers
const std::string & getExpr() const
std::vector< name::Component > m_matchResult
Represents an absolute name.
virtual bool match(const Name &name, size_t offset, size_t len)
RegexMatcher(const std::string &expr, const RegexExprType &type, shared_ptr< RegexBackrefManager > backrefManager=nullptr)