23 #ifndef NDN_NDN_REGEX_TOP_MATCHER_HPP
24 #define NDN_NDN_REGEX_TOP_MATCHER_HPP
26 #include "ndn-regex-matcher-base.hpp"
29 #if NDN_CPP_HAVE_REGEX_LIB
33 class NdnRegexPatternListMatcher;
34 class NdnRegexBackrefManager;
36 class NdnRegexTopMatcher:
public NdnRegexMatcherBase {
38 NdnRegexTopMatcher(
const std::string& expr,
const std::string& expand =
"");
41 ~NdnRegexTopMatcher();
44 match(
const Name& name);
47 match(
const Name& name,
size_t offset,
size_t len);
50 expand(
const std::string& expand =
"");
52 static ptr_lib::shared_ptr<NdnRegexTopMatcher>
53 fromName(
const Name& name,
bool hasAnchor=
false);
61 getItemFromExpand(
const std::string& expand,
size_t& offset);
64 convertSpecialChar(
const std::string& str);
67 const std::string expand_;
68 ptr_lib::shared_ptr<NdnRegexPatternListMatcher> primaryMatcher_;
69 ptr_lib::shared_ptr<NdnRegexPatternListMatcher> secondaryMatcher_;
70 ptr_lib::shared_ptr<NdnRegexBackrefManager> primaryBackrefManager_;
71 ptr_lib::shared_ptr<NdnRegexBackrefManager> secondaryBackrefManager_;
72 bool isSecondaryUsed_;
77 #endif // NDN_CPP_HAVE_REGEX_LIB