HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_PathPattern Class Reference

#include <UT_PathPattern.h>

+ Inheritance diagram for UT_PathPattern:

Classes

class  Token
 

Public Member Functions

 UT_PathPattern (const UT_StringRef &pattern, bool case_sensitive=true, bool assume_wildcards=false, bool allow_instance_indices=false)
 
virtual ~UT_PathPattern ()
 
bool matches (const UT_StringRef &path, bool *excludes_branch=nullptr) const
 
bool matches (const UT_StringRef &path, bool *excludes_branch, UT_PathPatternMatchDataPtr &match_data) const
 
bool getExplicitList (UT_StringArray &tokens) const
 
bool getExplicitListWithInstanceIds (UT_StringArray &paths, UT_StringArray &instance_patterns) const
 
bool getCaseSensitive () const
 
bool getAssumeWildcardsAroundPlainTokens () const
 
bool getAllowInstanceIndices () const
 
const UT_StringHoldergetPatternError () const
 

Protected Types

enum  MatchOp { MATCH_ADD, MATCH_SUBTRACT, MATCH_INTERSECT, MATCH_PRUNE }
 

Protected Member Functions

 UT_PathPattern (bool case_sensitive, bool assume_wildcards, bool allow_instance_indices)
 
UT_PathPatterncreatePruningPattern (int tokenidx)
 
UT_PathPatterncreatePrecedingGroupPattern (int tokenidx)
 
virtual UT_PathPatterncreateEmptyClone () const
 
virtual bool matchSpecialToken (const UT_StringRef &path, const Token &token, bool *excludes_branch) const
 
virtual bool matchSpecialTokenWithData (const UT_StringRef &path, const Token &token, bool *excludes_branch, UT_PathPatternMatchDataPtr &match_data) const
 
virtual UT_PathPatternMatchDataPtr makeLeafMatchData (const UT_StringRef &path, const Token &token) const
 
virtual UT_PathPatternMatchDataPtr combineMatchData (MatchOp op, const UT_PathPatternMatchDataPtr &lhs, const UT_PathPatternMatchDataPtr &rhs) const
 
virtual bool matchDataIsEmpty (const UT_PathPatternMatchDataPtr &match_data) const
 
void testForExplicitList ()
 
void patternInterrupted ()
 

Protected Attributes

UT_Array< TokenmyTokens
 

Detailed Description

Definition at line 52 of file UT_PathPattern.h.

Member Enumeration Documentation

enum UT_PathPattern::MatchOp
protected
Enumerator
MATCH_ADD 
MATCH_SUBTRACT 
MATCH_INTERSECT 
MATCH_PRUNE 

Definition at line 128 of file UT_PathPattern.h.

Constructor & Destructor Documentation

UT_PathPattern::UT_PathPattern ( const UT_StringRef pattern,
bool  case_sensitive = true,
bool  assume_wildcards = false,
bool  allow_instance_indices = false 
)
virtual UT_PathPattern::~UT_PathPattern ( )
virtual
UT_PathPattern::UT_PathPattern ( bool  case_sensitive,
bool  assume_wildcards,
bool  allow_instance_indices 
)
protected

Member Function Documentation

virtual UT_PathPatternMatchDataPtr UT_PathPattern::combineMatchData ( MatchOp  op,
const UT_PathPatternMatchDataPtr lhs,
const UT_PathPatternMatchDataPtr rhs 
) const
inlineprotectedvirtual

Reimplemented in HUSD_PathPattern.

Definition at line 155 of file UT_PathPattern.h.

virtual UT_PathPattern* UT_PathPattern::createEmptyClone ( ) const
inlineprotectedvirtual

Reimplemented in HUSD_PathPattern.

Definition at line 115 of file UT_PathPattern.h.

UT_PathPattern* UT_PathPattern::createPrecedingGroupPattern ( int  tokenidx)
protected
UT_PathPattern* UT_PathPattern::createPruningPattern ( int  tokenidx)
protected
bool UT_PathPattern::getAllowInstanceIndices ( ) const
inline

Definition at line 80 of file UT_PathPattern.h.

bool UT_PathPattern::getAssumeWildcardsAroundPlainTokens ( ) const
inline

Definition at line 78 of file UT_PathPattern.h.

bool UT_PathPattern::getCaseSensitive ( ) const
inline

Definition at line 76 of file UT_PathPattern.h.

bool UT_PathPattern::getExplicitList ( UT_StringArray tokens) const
bool UT_PathPattern::getExplicitListWithInstanceIds ( UT_StringArray paths,
UT_StringArray instance_patterns 
) const
const UT_StringHolder& UT_PathPattern::getPatternError ( ) const
inline

Definition at line 82 of file UT_PathPattern.h.

virtual UT_PathPatternMatchDataPtr UT_PathPattern::makeLeafMatchData ( const UT_StringRef path,
const Token token 
) const
inlineprotectedvirtual

Reimplemented in HUSD_PathPattern.

Definition at line 151 of file UT_PathPattern.h.

virtual bool UT_PathPattern::matchDataIsEmpty ( const UT_PathPatternMatchDataPtr match_data) const
inlineprotectedvirtual

Reimplemented in HUSD_PathPattern.

Definition at line 160 of file UT_PathPattern.h.

bool UT_PathPattern::matches ( const UT_StringRef path,
bool *  excludes_branch = nullptr 
) const
bool UT_PathPattern::matches ( const UT_StringRef path,
bool *  excludes_branch,
UT_PathPatternMatchDataPtr match_data 
) const
virtual bool UT_PathPattern::matchSpecialToken ( const UT_StringRef path,
const Token token,
bool *  excludes_branch 
) const
protectedvirtual

Reimplemented in HUSD_PathPattern.

virtual bool UT_PathPattern::matchSpecialTokenWithData ( const UT_StringRef path,
const Token token,
bool *  excludes_branch,
UT_PathPatternMatchDataPtr match_data 
) const
inlineprotectedvirtual

Reimplemented in HUSD_PathPattern.

Definition at line 142 of file UT_PathPattern.h.

void UT_PathPattern::patternInterrupted ( )
protected
void UT_PathPattern::testForExplicitList ( )
protected

Member Data Documentation

UT_Array<Token> UT_PathPattern::myTokens
protected

Definition at line 168 of file UT_PathPattern.h.


The documentation for this class was generated from the following file: