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();
114 PatternOp(PatternOp &parent, Operator op)
115 : myOwner(parent.myOwner),
120 PatternOp *
push(Operator op);
121 PatternOp *insertGroup();
122 bool containsOnlyAddOperations()
const;
124 PatternOp *leftOp() {
return myLeftOp.get(); }
125 const PatternOp *leftOp()
const {
return myLeftOp.get(); }
126 PatternOp *rightOp() {
return myRightOp.get(); }
127 const PatternOp *rightOp()
const {
return myRightOp.get(); }
140 PatternOpStep(PatternOp *op =
nullptr)
141 : myPatternOp(op), myFollowLeftChild(false) { }
143 PatternOp *myPatternOp;
144 bool myFollowLeftChild;
152 bool *excludes_branch)
const;
153 void printPattern(
const PatternOp *patternop,
155 static bool findToken(
int tokenidx,
156 PatternOpPath &oppath);
159 const PatternOp *patternop,
161 static bool patternOpPathContains(
162 const PatternOpPath &oppath,
163 const PatternOp *patternop);
164 static bool patternOpPathIntersects(
165 const PatternOpPath &oppath,
166 const PatternOp *patternop);
167 static void makePruningPatternOp(
168 PatternOp *patternop,
169 const PatternOpPath &oppath);
170 static void makePrecedingGroupPatternOp(
171 PatternOp *patternop,
172 const PatternOpPath &oppath,
174 static bool parsePattern(
const char *&pattern,
181 bool myIsExplicitList;
184 const bool myCaseSensitive;
185 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