24 #ifndef NDN_UTIL_REGEX_REGEX_MATCHER_HPP 25 #define NDN_UTIL_REGEX_REGEX_MATCHER_HPP 28 #include "../../name.hpp" 35 class Error :
public std::runtime_error
40 :
std::runtime_error(what)
56 shared_ptr<RegexBackrefManager> backrefManager =
nullptr);
62 match(
const Name& name,
size_t offset,
size_t len);
68 const std::vector<name::Component>&
89 recursiveMatch(
size_t matcherNo,
const Name& name,
size_t offset,
size_t len);
104 #endif // NDN_UTIL_REGEX_REGEX_MATCHER_HPP virtual void compile()=0
Compile the regular expression to generate the more matchers when necessary.
Copyright (c) 2013-2017 Regents of the University of California.
Error(const std::string &what)
std::ostream & operator<<(std::ostream &os, const Data &data)
const RegexExprType m_type
const std::string & getExpr() const
const std::vector< name::Component > & getMatchResult() const
get the matched name components
shared_ptr< RegexBackrefManager > m_backrefManager
std::vector< shared_ptr< RegexMatcher > > m_matchers
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)