C++ IP API  9.5.8
TCP & UDP for virtual user scripts
Facilita::PatternResponse Class Reference

The objects of this class are returned by receive methods. More...

Inheritance diagram for Facilita::PatternResponse:
Collaboration diagram for Facilita::PatternResponse:

Public Methods

 PatternResponse ()
 Default constructor. More...
 
 PatternResponse (::VirtualUserInterface &vu, const string &data, int patternIndex)
 Constructor, not called directly. More...
 
 PatternResponse (::VirtualUserInterface &vu, const string &data, const string &error)
 Constructor, not called directly. More...
 
 PatternResponse (::VirtualUserInterface &vu, const Exception &error)
 Constructor, not called directly. More...
 
 PatternResponse (const PatternResponse &orig)
 Constructor, not called directly. More...
 
int index () const
 Objects of this class are returned by receive methods. The index property holds a non-negative integer determining the index of a sub-pattern in a list of Patterns. More...
 
PatternResponseoperator= (const PatternResponse &other)
 Assignment operator for this class. More...
 
- Public Methods inherited from Facilita::ReceiveResponse
 ReceiveResponse ()
 Default constructor. More...
 
 ReceiveResponse (::VirtualUserInterface &vu, const string &data)
 Constructor, not called directly. More...
 
 ReceiveResponse (::VirtualUserInterface &vu, const string &data, const string &error)
 Constructor, not called directly. More...
 
 ReceiveResponse (::VirtualUserInterface &vu, const Exception &error)
 Constructor, not called directly. More...
 
 ReceiveResponse (const ReceiveResponse &orig)
 Constructor, not called directly. More...
 
ReceiveResponseoperator= (const ReceiveResponse &other)
 Assignment operator for this class. More...
 
- Public Methods inherited from Facilita::BaseResponse
 BaseResponse ()
 Default constructor. More...
 
 BaseResponse (const string &error)
 Constructor, not called directly. More...
 
 BaseResponse (const Exception &error)
 Constructor, not called directly. More...
 
 BaseResponse (const BaseResponse &orig)
 Copy Constructor. More...
 
int code () const
 The numeric value of any error . More...
 
const string & error () const
 
Returns
A string describing the error that has occurred. Empty if no error has occurred
More...
 
bool isError () const
 Has there been an error? More...
 
BaseResponseoperator= (const BaseResponse &other)
 Assignment operator for this class. More...
 
- Public Methods inherited from Facilita::ExtractorWithActions
 ExtractorWithActions ()
 
 ExtractorWithActions (VirtualUserInterface &vu, const string &data)
 
 ExtractorWithActions (VirtualUserInterface &vu, const string &path, int dummy)
 
 ExtractorWithActions (const ExtractorWithActions &other)
 
virtual ~ExtractorWithActions ()
 
ExtractorWithActionsoperator= (const ExtractorWithActions &other)
 
bool find (ExtractionCursor &cursor, const string &text, bool caseSensitive=true)
 Find a string searching forwards. More...
 
bool rfind (ExtractionCursor &cursor, const string &text, bool caseSensitive=true)
 Find a string searching backwards. More...
 
string extract (ExtractionCursor &cursor, const string &before, const string &after, const string &defaultValue, bool caseSensitive=true)
 Extract a sub-string. More...
 
string extractFromEnd (ExtractionCursor &cursor, const string &after, const string &before, const string &defaultValue, bool caseSensitive=true)
 
string extract (ExtractionCursor &cursor, const StringVector &before, const string &after, const string &defaultValue, bool caseSensitive=true)
 Extract a string after a list strings. More...
 
string extractFromEnd (ExtractionCursor &cursor, const StringVector &after, const string &before, const string &defaultValue, bool caseSensitive=true)
 
string extract (ExtractionCursor &cursor, const StringVector &before, const string &after, bool caseSensitive=true)
 Extract a string after a list strings. More...
 
string extractFromEnd (ExtractionCursor &cursor, const StringVector &after, const string &before, bool caseSensitive=true)
 
string extract (ExtractionCursor &cursor, const string &before, const string &after, bool caseSensitive=true)
 Extract a string between two others. More...
 
string extractFromEnd (ExtractionCursor &cursor, const string &after, const string &before, bool caseSensitive=true)
 
RegExpMatchList extractRegExp (ExtractionCursor &cursor, const string &regExp, bool caseSensitive=true)
 Extract a RegexMatchList. More...
 
string extractRegExp (ExtractionCursor &cursor, const string &beforeRegExp, const string &afterRegExp, bool caseSensitive=true)
 
string extractRegExpFromEnd (ExtractionCursor &cursor, const string &afterRegExp, const string &beforeRegExp, bool caseSensitive=true)
 
bool verifyContains (const string &text, bool caseSensitive=true)
 Verify a string can be found in the data of this object. More...
 
bool find (ExtractionCursor &cursor, const string &text, ActionType failAction, bool caseSensitive=true)
 
bool rfind (ExtractionCursor &cursor, const string &text, ActionType failAction, bool caseSensitive=true)
 
string extract (ExtractionCursor &cursor, const string &before, const string &after, ActionType failAction, bool caseSensitive=true)
 Extract a string starting from a position searching forwards in the data held in this object and determined by the Facilita::ExtractionCursor. On failure the Facilita::Action parameter determines the action taken. More...
 
string extractFromEnd (ExtractionCursor &cursor, const string &after, const string &before, ActionType failAction, bool caseSensitive=true)
 
string extract (ExtractionCursor &cursor, const StringVector &before, const string &after, ActionType failAction, bool caseSensitive=true)
 Extract a string starting from a position searching forwards in the data held in this object and determined by the Facilita::ExtractionCursor. On failure the Facilita::Action parameter determines the action taken. More...
 
string extractFromEnd (ExtractionCursor &cursor, const StringVector &after, const string &before, ActionType failAction, bool caseSensitive=true)
 
string extractRegExp (ExtractionCursor &cursor, const string &beforeRegExp, const string &afterRegExp, ActionType failAction, bool caseSensitive=true)
 
string extractRegExpFromEnd (ExtractionCursor &cursor, const string &afterRegExp, const string &beforeRegExp, ActionType failAction, bool caseSensitive=true)
 
bool verifyContains (const string &text, ActionType failAction, bool caseSensitive)
 
VirtualUserInterface * getVU ()
 
- Public Methods inherited from Facilita::Extractor
 Extractor ()
 
 Extractor (const string &data)
 
 Extractor (const string &path, int dummy)
 
 Extractor (const Extractor &other)
 
virtual ~Extractor ()
 
void advanceRewind ()
 
const string & data () const
 
string extract (ExtractionCursor &cursor, const string &before, const string &after, const string &defaultValue, bool caseSensitive=true)
 Extract a sub-string. More...
 
string extract (ExtractionCursor &cursor, const StringVector &before, const string &after, const string &defaultValue, bool caseSensitive=true)
 Extract a string after a list strings. More...
 
string extract (ExtractionCursor &cursor, const StringVector &before, const string &after, bool caseSensitive=true)
 Extract a string after a list strings. More...
 
string extract (ExtractionCursor &cursor, const string &before, const string &after, bool caseSensitive=true)
 Extract a string between two others. More...
 
string extractFromEnd (ExtractionCursor &cursor, const string &after, const string &before, const string &defaultValue, bool caseSensitive=true)
 
string extractFromEnd (ExtractionCursor &cursor, const StringVector &after, const string &before, const string &defaultValue, bool caseSensitive=true)
 
string extractFromEnd (ExtractionCursor &cursor, const StringVector &after, const string &before, bool caseSensitive=true)
 
string extractFromEnd (ExtractionCursor &cursor, const string &after, const string &before, bool caseSensitive=true)
 
virtual StringVector extractList (const string &before, const string &after, bool caseSensitive=true, int maxItems=-1)
 
virtual StringVector extractList (ExtractionCursor &cursor, const string &before, const string &after, const string &endAt="", bool caseSensitive=true, int maxItems=-1)
 
RegExpMatchList extractRegExp (ExtractionCursor &cursor, const string &regExp, bool caseSensitive=true)
 Extract a RegexMatchList. More...
 
string extractRegExp (ExtractionCursor &cursor, const string &beforeRegExp, const string &afterRegExp, bool caseSensitive=true)
 
string extractRegExpFromEnd (ExtractionCursor &cursor, const string &afterRegExp, const string &beforeRegExp, bool caseSensitive=true)
 
bool find (ExtractionCursor &cursor, const string &text, bool caseSensitive=true)
 Find a string searching forwards. More...
 
bool findPtr (int startPos, const StringVector &before, const char *pAfterString, bool casesensitive, char **pMatchedString, int &matchedStringPos, int &matchedStringlength)
 
int findString (int startPos, const string &str, bool caseSensitive=true)
 
int findString (int startPos, const char *pBeforeString, bool casesensitive)
 
int findStringCheck (int startPos, const char *str, const char checkChar)
 
int findStringCheckIc (int startPos, const char *string, const char checkChar, bool skipQuotes, int endPos=0)
 
virtual string getCharEncoding ()
 
const char * getContentPtr (void)
 
int getCurrentPosition () const
 
int & getCurrentPositionRef ()
 
const char * getKeywordValue (const char *keyword, int &valueLen, bool bRemoveQuotes)
 
void incrementCurrentPosition (int inc=1)
 
Extractoroperator= (const Extractor &other)
 
Extractoroperator= (const string &data)
 
const string path () const
 
void rewind ()
 
bool rfind (ExtractionCursor &cursor, const string &text, bool caseSensitive=true)
 Find a string searching backwards. More...
 
bool rfindPtr (int startPos, const StringVector &after, const char *pBeforeString, bool casesensitive, char **pMatchedString, int &matchedStringPos, int &matchedStringlength)
 
int rfindString (int startPos, const string &str, bool caseSensitive=true)
 
int rfindString (int startPos, const char *str)
 
int rfindStringIc (int startPos, const char *str)
 
virtual void setCharEncoding (const string &charEncoding)
 
void setCurrentPosition (int position)
 
void setEndSearch ()
 
void skipToStringIc (const char *pTag)
 
string stringAtCurrentPosition (int len) const
 
bool verifyContains (const string &text, bool caseSensitive=true)
 Verify does not contain the specfied string. More...
 

Detailed Description

The objects of this class are returned by receive methods.

This class inherits from ReceiveResponse and additionally supports string pattern matching.

Constructors

Facilita::PatternResponse::PatternResponse ( )

Default constructor.

Facilita::PatternResponse::PatternResponse ( ::VirtualUserInterface &  vu,
const string &  data,
int  patternIndex 
)

Constructor, not called directly.

Facilita::PatternResponse::PatternResponse ( ::VirtualUserInterface &  vu,
const string &  data,
const string &  error 
)

Constructor, not called directly.

Facilita::PatternResponse::PatternResponse ( ::VirtualUserInterface &  vu,
const Exception &  error 
)

Constructor, not called directly.

Facilita::PatternResponse::PatternResponse ( const PatternResponse orig)

Constructor, not called directly.

Methods

int Facilita::PatternResponse::index ( ) const

Objects of this class are returned by receive methods. The index property holds a non-negative integer determining the index of a sub-pattern in a list of Patterns.

Returns
The index of the matching Facilita::Pattern.
PatternResponse& Facilita::PatternResponse::operator= ( const PatternResponse other)

Assignment operator for this class.

Returns
The this object.

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