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

#include <PDG_BasePattern.h>

+ Inheritance diagram for PDG_BasePattern:

Public Member Functions

 PDG_BasePattern (const UT_StringHolder &pattern)
 Constructs a default-initialized, invalid pattern. More...
 
bool isValid () const
 
const UT_WorkBuffererrors () const
 If the pattern is invalid, contains parse errors. More...
 
const UT_StringHolderpattern () const
 Returns the pattern used to construct this object. More...
 
bool hasPattern () const
 Returns true if there is a pattern set. More...
 
void reset (const UT_StringHolder &pattern)
 Resets the pattern. More...
 

Protected Types

enum  ParseTokens : uint8 {
  eStarToken = '*', eExcludeToken = '^', eSeparatorToken = ':', eRangeToken = '-',
  eQuoteToken = '"', eEscapeToken = '\\', eRangeBeginToken = '[', eRangeEndToken = ']',
  eAttributeToken = '@', eComponentToken = '.'
}
 Special tokens, in addition to alphanumeric and whitespace. More...
 

Protected Attributes

UT_WorkBuffer myErrors
 Parse errors. More...
 
UT_StringHolder myPattern
 The pattern used to construct this object. More...
 
bool myIsValid
 Whether or not the pattern is valid. More...
 

Detailed Description

Base class for pattern matching utilities

Definition at line 20 of file PDG_BasePattern.h.

Member Enumeration Documentation

Special tokens, in addition to alphanumeric and whitespace.

Enumerator
eStarToken 

Star token for globbing.

eExcludeToken 

Exclusion token.

eSeparatorToken 

Type or range split token.

eRangeToken 

Value range token.

eQuoteToken 

Double quote token.

eEscapeToken 

Escape token.

eRangeBeginToken 

Range begin token.

eRangeEndToken 

Range end token.

eAttributeToken 

Attribute name token.

eComponentToken 

Attribute component token.

Definition at line 57 of file PDG_BasePattern.h.

Constructor & Destructor Documentation

PDG_BasePattern::PDG_BasePattern ( const UT_StringHolder pattern)
inline

Constructs a default-initialized, invalid pattern.

Definition at line 24 of file PDG_BasePattern.h.

Member Function Documentation

const UT_WorkBuffer& PDG_BasePattern::errors ( ) const
inline

If the pattern is invalid, contains parse errors.

Definition at line 35 of file PDG_BasePattern.h.

bool PDG_BasePattern::hasPattern ( ) const
inline

Returns true if there is a pattern set.

Definition at line 43 of file PDG_BasePattern.h.

bool PDG_BasePattern::isValid ( ) const
inline

Returns true if the pattern is valid, else false. If the pattern is invalid the errors() contains a string representation of any parse errors

Definition at line 31 of file PDG_BasePattern.h.

const UT_StringHolder& PDG_BasePattern::pattern ( ) const
inline

Returns the pattern used to construct this object.

Definition at line 39 of file PDG_BasePattern.h.

void PDG_BasePattern::reset ( const UT_StringHolder pattern)
inline

Resets the pattern.

Definition at line 48 of file PDG_BasePattern.h.

Member Data Documentation

UT_WorkBuffer PDG_BasePattern::myErrors
protected

Parse errors.

Definition at line 92 of file PDG_BasePattern.h.

bool PDG_BasePattern::myIsValid
protected

Whether or not the pattern is valid.

Definition at line 98 of file PDG_BasePattern.h.

UT_StringHolder PDG_BasePattern::myPattern
protected

The pattern used to construct this object.

Definition at line 95 of file PDG_BasePattern.h.


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