24 #ifndef NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP 25 #define NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP 31 class RegexPatternListMatcher;
32 class RegexBackrefManager;
44 match(
const Name& name,
size_t offset,
size_t len)
override;
49 static shared_ptr<RegexTopMatcher>
58 getItemFromExpand(
const std::string& expand,
size_t& offset);
61 convertSpecialChar(
const std::string& str);
64 const std::string m_expand;
65 shared_ptr<RegexPatternListMatcher> m_primaryMatcher;
66 shared_ptr<RegexPatternListMatcher> m_secondaryMatcher;
67 shared_ptr<RegexBackrefManager> m_primaryBackrefManager;
68 shared_ptr<RegexBackrefManager> m_secondaryBackrefManager;
69 bool m_isSecondaryUsed;
74 #endif // NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
static shared_ptr< RegexTopMatcher > fromName(const Name &name, bool hasAnchor=false)
void compile() override
Compile the regular expression to generate the more matchers when necessary.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Represents an absolute name.
virtual Name expand(const std::string &expand="")
bool match(const Name &name)
RegexTopMatcher(const std::string &expr, const std::string &expand="")