8 #ifndef __UT_PathPattern_h__
9 #define __UT_PathPattern_h__
39 bool case_sensitive =
true,
40 bool assume_wildcards =
false);
44 bool *excludes_branch =
nullptr)
const;
48 {
return myCaseSensitive; }
50 {
return myAssumeWildcardsAroundPlainTokens; }
52 {
return myPatternError; }
58 bool do_path_matching,
61 myDoPathMatching(do_path_matching),
62 myHasWildcards(has_wildcards),
63 myIsSpecialToken(false)
77 bool assume_wildcards);
84 myAssumeWildcardsAroundPlainTokens);
86 virtual bool matchSpecialToken(
89 bool *excludes_branch)
const;
90 void testForExplicitList();
91 void patternInterrupted();
115 PatternOp(PatternOp &parent, Operator op)
116 : myOwner(parent.myOwner),
121 PatternOp *
push(Operator op);
122 PatternOp *insertGroup();
123 bool containsOnlyAddOperations()
const;
125 PatternOp *leftOp() {
return myLeftOp.get(); }
126 const PatternOp *leftOp()
const {
return myLeftOp.get(); }
127 PatternOp *rightOp() {
return myRightOp.get(); }
128 const PatternOp *rightOp()
const {
return myRightOp.get(); }
141 PatternOpStep(PatternOp *op =
nullptr)
142 : myPatternOp(op), myFollowLeftChild(false) { }
144 PatternOp *myPatternOp;
145 bool myFollowLeftChild;
153 bool *excludes_branch)
const;
154 void printPattern(
const PatternOp *patternop,
156 static bool findToken(
int tokenidx,
157 PatternOpPath &oppath);
160 const PatternOp *patternop,
162 static bool patternOpPathContains(
163 const PatternOpPath &oppath,
164 const PatternOp *patternop);
165 static bool patternOpPathIntersects(
166 const PatternOpPath &oppath,
167 const PatternOp *patternop);
168 static void makePruningPatternOp(
169 PatternOp *patternop,
170 const PatternOpPath &oppath);
171 static void makePrecedingGroupPatternOp(
172 PatternOp *patternop,
173 const PatternOpPath &oppath,
175 static bool parsePattern(
const char *&pattern,
182 bool myIsExplicitList;
185 const bool myCaseSensitive;
186 const bool myAssumeWildcardsAroundPlainTokens;
*pool push(my_func, arg1,...)
GLsizei const GLchar *const * path
const UT_StringHolder & getPatternError() const
A reference counter base class for use with UT_IntrusivePtr.
bool getCaseSensitive() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
UT_Array< Token > myTokens
bool getAssumeWildcardsAroundPlainTokens() const
UT_IntrusivePtr< UT_SpecialTokenData > UT_SpecialTokenDataPtr
Token(const UT_StringHolder &str, bool do_path_matching, bool has_wildcards)
virtual ~UT_SpecialTokenData()
virtual UT_PathPattern * createEmptyClone() const
UT_SpecialTokenDataPtr mySpecialTokenDataPtr