VR-Link API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | 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:

Public Member Functions

 DtStringPatternMatch ()
 default constructor More...
 
 DtStringPatternMatch (const DtString &testStr, const DtString &pattern=DtString::nullString())
 constructor with provided test string and pattern More...
 
virtual void setPattern (const DtString &pattern)
 get/set pattern More...
 
virtual const DtStringpattern () const
 
virtual void setString (const DtString &testStr)
 get/set test string More...
 
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. More...
 
virtual ~DtStringPatternMatch ()
 destructor More...
 

Protected Member Functions

void buildSkipTable ()
 build the skip table given the pattern More...
 

Protected Attributes

DtString myStrCopy
 
DtString myPattern
 
intmySkipTable
 

Static Protected Attributes

static const int theSkipTableSize
 

Private Member Functions

 DtStringPatternMatch (const DtStringPatternMatch &orig)
 copy constructor – Not implemented More...
 
DtStringPatternMatchoperator= (const DtStringPatternMatch &orig)
 assignment operator – Not implemented More...
 

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

DtStringPatternMatch::DtStringPatternMatch ( )

default constructor

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

constructor with provided test string and pattern

DtStringPatternMatch::DtStringPatternMatch ( const DtStringPatternMatch orig)
private

copy constructor – Not implemented

virtual DtStringPatternMatch::~DtStringPatternMatch ( )
virtual

destructor

Member Function Documentation

void DtStringPatternMatch::buildSkipTable ( )
protected

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

DtString DtStringPatternMatch::myPattern
protected
int* DtStringPatternMatch::mySkipTable
protected
DtString DtStringPatternMatch::myStrCopy
protected
const int DtStringPatternMatch::theSkipTableSize
staticprotected

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

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)