C++ IP API  9.5.7
TCP & UDP for virtual user scripts
Facilita::PatternList Class Reference

A Pattern which is a list other Pattern instances. More...

Inheritance diagram for Facilita::PatternList:
Collaboration diagram for Facilita::PatternList:

Public Methods

 PatternList ()
 Default constructor. More...
 
void append (const string &s)
 Append a SimplePattern to the end of the list. More...
 
void append (Pattern &pattern)
 Append a Pattern to the end of the list. More...
 
int getMatchIndex ()
 
Returns
Return the index of the matched pattern. Starts from 0.
More...
 
int isSatisfiedBy (char ch)
 Not called directly by test scripts. More...
 
void reset ()
 Not called directly by test scripts. More...
 
string toString ()
 
Returns
A string version of this pattern.
More...
 
- Public Methods inherited from Facilita::Pattern
 Pattern ()
 
virtual ~Pattern ()
 

Detailed Description

A Pattern which is a list other Pattern instances.

A search for this Pattern is is satisfied if at least one of the contained Patterns is satisfied. The internal read position on input stream is advanced to the byte following the end of Pattern found. Each of the Patterns in the list is searched for in parallel. An entry in the list takes precedence in matching over entries that follow it.

PatternList patternList; // declare a Pattern list
patternList.append("John Donne"); // this alternative will never be found
patternList.append("John"); // this alternative will always be found in preference to the one before and after
patternList.append("John1"); // this alternative will never be found

Constructors

Facilita::PatternList::PatternList ( )

Default constructor.

Methods

void Facilita::PatternList::append ( const string &  s)

Append a SimplePattern to the end of the list.

Parameters
sThe string on which to base the added Pattern.
void Facilita::PatternList::append ( Pattern pattern)

Append a Pattern to the end of the list.

Parameters
patternThe Pattern to be added.
int Facilita::PatternList::getMatchIndex ( )

Returns
Return the index of the matched pattern. Starts from 0.

int Facilita::PatternList::isSatisfiedBy ( char  ch)
virtual

Not called directly by test scripts.

Implements Facilita::Pattern.

void Facilita::PatternList::reset ( )
virtual

Not called directly by test scripts.

Implements Facilita::Pattern.

string Facilita::PatternList::toString ( )
virtual

Returns
A string version of this pattern.

Implements Facilita::Pattern.


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