8 #ifndef NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
9 #define NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
11 #include "../../common.hpp"
17 class RegexPatternListMatcher;
18 class RegexBackrefManager;
32 match(
const Name& name,
const int& offset,
const int& length);
37 static shared_ptr<RegexTopMatcher>
46 getItemFromExpand(
const std::string& expand,
size_t& offset);
49 convertSpecialChar(
const std::string& str);
52 const std::string m_expand;
53 shared_ptr<RegexPatternListMatcher> m_primaryMatcher;
54 shared_ptr<RegexPatternListMatcher> m_secondaryMatcher;
55 shared_ptr<RegexBackrefManager> m_primaryBackRefManager;
56 shared_ptr<RegexBackrefManager> m_secondaryBackRefManager;
62 #endif // NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
static shared_ptr< RegexTopMatcher > fromName(const Name &name, bool hasAnchor=false)
virtual void compile()
Compile the regular expression to generate the more matchers when necessary.
A Name holds an array of Name::Component and represents an NDN name.
virtual Name expand(const std::string &expand="")
bool match(const Name &name)
virtual ~RegexTopMatcher()
RegexTopMatcher(const std::string &expr, const std::string &expand="")