OCC Main Page | WOK | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

WOK
TKWOK
WOKNT


WOKNT_RegExp Class Reference

provides regular expression matching and searching

#include <WOKNT_RegExp.hxx>


Public Member Functions

Standard_EXPORT WOKNT_RegExp ()
 creates a class instance

Standard_EXPORT WOKNT_RegExp (const Handle(TCollection_HAsciiString)&aPattern, const WOKNT_RESyntax aSyntax=WOKNT_RESyntaxAWK, const Standard_Address aTransTbl=NULL, const Standard_Integer aTblLen=0)
 creates a class instance with given pattern that denotes a set
of strings. Defines a translation table <atranstbl> and
its length <atbllen> to perform character translation.
Supply NULL for <atranstbl> and zero value for <atbllen>
if no translation necessary. It is possible to set
syntax of the regular expression by meaning <asyntax>
parameter.
Warning: raises if syntax of the regular expression given is incorrect

Standard_EXPORT void Destroy ()
 destroys all resources attached to the class instanse

 ~WOKNT_RegExp ()
Standard_EXPORT void SetPattern (const Handle(TCollection_HAsciiString)&aPattern, const WOKNT_RESyntax aSyntax=WOKNT_RESyntaxAWK, const Standard_Address aTransTbl=NULL, const Standard_Integer aTblLen=0)
 sets a new match pattern and possibly a new pattern syntax
Warning: raises if the syntax given is incorrect

Standard_EXPORT Standard_Integer Search (const Handle(TCollection_HAsciiString)&aString, const Standard_Integer aStartPos=1) const
 searches a sub-string in the <astring> which matches
the specified pattern starting at index <astartpos>.
Returns an index of the match position on success.
Returns -1 if no match was found.
Returns -2 if error was occur.
Warning: raises if no search pattern was set

Standard_EXPORT Standard_Integer Match (const Handle(TCollection_HAsciiString)&aString, const Standard_Integer aStartPos=1, const Standard_Integer aStopPos=1) const
 match the pattern given against the string <astring>
starting at index <astartpos>. Do not consider matching
past the position <astoppos>.
Returns the length of the string matched on success.
Returns -1 if no match was found.
Returns -2 if error was occur.
Warning: raises if no search pattern was set

Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Attributes

Standard_Address myBuffer
Standard_Boolean myAlloc


Constructor & Destructor Documentation

Standard_EXPORT WOKNT_RegExp::WOKNT_RegExp  ) 
 

Standard_EXPORT WOKNT_RegExp::WOKNT_RegExp const Handle(TCollection_HAsciiString)&  aPattern,
const WOKNT_RESyntax  aSyntax = WOKNT_RESyntaxAWK,
const Standard_Address  aTransTbl = NULL,
const Standard_Integer  aTblLen = 0
 

WOKNT_RegExp::~WOKNT_RegExp  )  [inline]
 


Member Function Documentation

Standard_EXPORT void WOKNT_RegExp::Destroy  ) 
 

Standard_EXPORT const WOKNT_RegExp::Handle Standard_Type   )  const
 

Standard_EXPORT Standard_Integer WOKNT_RegExp::Match const Handle(TCollection_HAsciiString)&  aString,
const Standard_Integer  aStartPos = 1,
const Standard_Integer  aStopPos = 1
const
 

Standard_EXPORT Standard_Integer WOKNT_RegExp::Search const Handle(TCollection_HAsciiString)&  aString,
const Standard_Integer  aStartPos = 1
const
 

Standard_EXPORT void WOKNT_RegExp::SetPattern const Handle(TCollection_HAsciiString)&  aPattern,
const WOKNT_RESyntax  aSyntax = WOKNT_RESyntaxAWK,
const Standard_Address  aTransTbl = NULL,
const Standard_Integer  aTblLen = 0
 


Field Documentation

Standard_Boolean WOKNT_RegExp::myAlloc [private]
 

Standard_Address WOKNT_RegExp::myBuffer [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 15:00:10 2008 for OpenCASCADE by  doxygen 1.4.1