VR-Link API Documentation for DIS
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtStringPatternMatch Class Reference

Performs pattern matching against user specified DtString using Boyer Moore algorithm. More...

+ Collaboration diagram for DtStringPatternMatch:

List of all members.

Public Member Functions

 DtStringPatternMatch ()
 default constructor
 DtStringPatternMatch (const DtString &testStr, const DtString &pattern=DtString::nullString())
 constructor with provided test string and pattern
virtual void setPattern (const DtString &pattern)
 get/set pattern
virtual const DtStringpattern () const
virtual void setString (const DtString &testStr)
 get/set test string
virtual const DtStringstring () const
virtual int indexOfOccurence (const int start=0)
 performs the pattern matching and report the index into the test string where the first character of the pattern is.
virtual ~DtStringPatternMatch ()
 destructor

Protected Member Functions

void buildSkipTable ()
 build the skip table given the pattern

Protected Attributes

DtString myStrCopy
DtString myPattern
int * mySkipTable

Static Protected Attributes

static const int theSkipTableSize

Private Member Functions

 DtStringPatternMatch (const DtStringPatternMatch &orig)
 copy constructor -- Not implemented
DtStringPatternMatchoperator= (const DtStringPatternMatch &orig)
 assignment operator -- Not implemented

Detailed Description

Performs pattern matching against user specified DtString using Boyer Moore algorithm.

Note: This has been deprecated as of VR-Link 3.11. String replacement can also be done with the DtReplaceAllSubstrings and DtReplaceSubstring methods above.

Deprecated:

Constructor & Destructor Documentation

default constructor

DtStringPatternMatch::DtStringPatternMatch ( const DtString testStr,
const DtString pattern = DtString::nullString() 
)

constructor with provided test string and pattern

copy constructor -- Not implemented

destructor


Member Function Documentation

build the skip table given the pattern

virtual int DtStringPatternMatch::indexOfOccurence ( const int  start = 0) [virtual]

performs the pattern matching and report the index into the test string where the first character of the pattern is.

User can also specify a zero based index into the test string after which the pattern matching will be performed. currently supports ASCII 256 character base returns -1 for no occurrence found returns -2 for uninitialized test string or pattern

DtStringPatternMatch& DtStringPatternMatch::operator= ( const DtStringPatternMatch orig) [private]

assignment operator -- Not implemented

virtual const DtString& DtStringPatternMatch::pattern ( ) const [virtual]
virtual void DtStringPatternMatch::setPattern ( const DtString pattern) [virtual]

get/set pattern

virtual void DtStringPatternMatch::setString ( const DtString testStr) [virtual]

get/set test string

virtual const DtString& DtStringPatternMatch::string ( ) const [virtual]

Member Data Documentation

const int DtStringPatternMatch::theSkipTableSize [static, protected]

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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)