C++ IP API
9.5.7
TCP & UDP for virtual user scripts
|
A means to search and extract information from a string. More...
Public Methods | |
ExtractorWithActions () | |
ExtractorWithActions (VirtualUserInterface &vu, const string &data) | |
ExtractorWithActions (VirtualUserInterface &vu, const string &path, int dummy) | |
ExtractorWithActions (const ExtractorWithActions &other) | |
virtual | ~ExtractorWithActions () |
ExtractorWithActions & | operator= (const ExtractorWithActions &other) |
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 ®Exp, 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) |
Extractor & | operator= (const Extractor &other) |
Extractor & | operator= (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... | |
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 ®Exp, 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 () |
A means to search and extract information from a string.
Facilita::ExtractorWithActions::ExtractorWithActions | ( | ) |
Facilita::ExtractorWithActions::ExtractorWithActions | ( | VirtualUserInterface & | vu, |
const string & | data | ||
) |
Facilita::ExtractorWithActions::ExtractorWithActions | ( | VirtualUserInterface & | vu, |
const string & | path, | ||
int | dummy | ||
) |
Facilita::ExtractorWithActions::ExtractorWithActions | ( | const ExtractorWithActions & | other | ) |
|
virtual |
string Facilita::ExtractorWithActions::extract | ( | ExtractionCursor & | cursor, |
const string & | before, | ||
const string & | after, | ||
const string & | defaultValue, | ||
bool | caseSensitive = true |
||
) |
Extract a sub-string.
From the current position search forwards for string in the data held in this object.
cursor | ExtractionCursor holds the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is retained |
before | A string to find before the extracted string. |
after | A string to find after the extracted string. |
defaultValue | A string returned if the search fails. |
caseSensitive | Indicate if search is to be case sensitive. |
string Facilita::ExtractorWithActions::extract | ( | ExtractionCursor & | cursor, |
const StringVector & | before, | ||
const string & | after, | ||
const string & | defaultValue, | ||
bool | caseSensitive = true |
||
) |
Extract a string after a list strings.
From the current position search forwards for string in the data held in this object.
cursor | ExtractionCursor holding the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is retained |
before | A vector of strings to find before the extraction. |
after | A string of to text to find after the extracted string. |
defaultValue | A string returned if the search fails. |
caseSensitive | Indicate if search is to be case sensitive. |
string Facilita::ExtractorWithActions::extract | ( | ExtractionCursor & | cursor, |
const StringVector & | before, | ||
const string & | after, | ||
bool | caseSensitive = true |
||
) |
Extract a string after a list strings.
From the current position search forwards for string in the data held in this object.
cursor | ExtractionCursor holds the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is retained |
before | A vector of strings to find before the extracted string. |
after | A string to find after the extracted string. |
caseSensitive | Indicate if search is to be case sensitive. |
On failure an error action (Action::VU_ERROR) is generated.
string Facilita::ExtractorWithActions::extract | ( | ExtractionCursor & | cursor, |
const string & | before, | ||
const string & | after, | ||
bool | caseSensitive = true |
||
) |
Extract a string between two others.
From the current position search forwards for string in the data held in this object.
cursor | ExtractionCursor holds the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is retained |
before | A string to find before the extracted string. |
after | A string to find after the extracted string. |
caseSensitive | Indicate if search is to be case sensitive. |
On failure an error action (Action::VU_ERROR) is generated.
string Facilita::ExtractorWithActions::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.
cursor | Facilita::ExtractionCursor defining the current position and state of search in the data. The cursor is updated as a result of a succesful search |
before | A string of to text to find before the extracted string. |
after | A string of to text to find after the extracted string. |
failAction | The Facilita::Action to be taken on failure. |
caseSensitive | Indicate if search is to be case sensitive. |
string Facilita::ExtractorWithActions::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.
cursor | Facilita::ExtractionCursor defining the current position and state of search in the data. The cursor is updated as a result of a succesful search |
before | A vector of strings of to text to find before the extracted string. |
after | A string of to text to find after the extracted string. |
failAction | The Facilita::Action to be taken on failure. |
caseSensitive | Indicate if search is to be case sensitive. |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const string & | after, | ||
const string & | before, | ||
const string & | defaultValue, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const StringVector & | after, | ||
const string & | before, | ||
const string & | defaultValue, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const StringVector & | after, | ||
const string & | before, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const string & | after, | ||
const string & | before, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const string & | after, | ||
const string & | before, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractFromEnd | ( | ExtractionCursor & | cursor, |
const StringVector & | after, | ||
const string & | before, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
RegExpMatchList Facilita::ExtractorWithActions::extractRegExp | ( | ExtractionCursor & | cursor, |
const string & | regExp, | ||
bool | caseSensitive = true |
||
) |
Extract a RegexMatchList.
Extract a RegexMatchList object starting from a position searching forwards in the data held in this object and determined by the Facilita::ExtractionCursor. On failure the associated Facilita::Action determines the action taken.
cursor | Facilita::ExtractionCursor defining the current position and state of search in the data. The cursor is updated as a result of a succesful extraction |
regExp | A string of to text in regular expression format. |
caseSensitive | Indicate if search is to be case sensitive. |
string Facilita::ExtractorWithActions::extractRegExp | ( | ExtractionCursor & | cursor, |
const string & | beforeRegExp, | ||
const string & | afterRegExp, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractRegExp | ( | ExtractionCursor & | cursor, |
const string & | beforeRegExp, | ||
const string & | afterRegExp, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractRegExpFromEnd | ( | ExtractionCursor & | cursor, |
const string & | afterRegExp, | ||
const string & | beforeRegExp, | ||
bool | caseSensitive = true |
||
) |
string Facilita::ExtractorWithActions::extractRegExpFromEnd | ( | ExtractionCursor & | cursor, |
const string & | afterRegExp, | ||
const string & | beforeRegExp, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
bool Facilita::ExtractorWithActions::find | ( | ExtractionCursor & | cursor, |
const string & | text, | ||
bool | caseSensitive = true |
||
) |
Find a string searching forwards.
From the current position search for string in the data held in this object.
cursor | ExtractionCursor holds the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is maintained. |
text | The string to find. |
caseSensitive | Indicate if search is to be case sensitive. |
bool Facilita::ExtractorWithActions::find | ( | ExtractionCursor & | cursor, |
const string & | text, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
VirtualUserInterface* Facilita::ExtractorWithActions::getVU | ( | ) |
ExtractorWithActions& Facilita::ExtractorWithActions::operator= | ( | const ExtractorWithActions & | other | ) |
bool Facilita::ExtractorWithActions::rfind | ( | ExtractionCursor & | cursor, |
const string & | text, | ||
bool | caseSensitive = true |
||
) |
Find a string searching backwards.
From the current position search backwards for string in the data held in this object.
cursor | ExtractionCursor holds the current position and state of search in the data. The cursor is updated as a result of a succesful search, otherwise the current position is retained |
text | The string to find. |
caseSensitive | Indicate if search is to be case sensitive. |
bool Facilita::ExtractorWithActions::rfind | ( | ExtractionCursor & | cursor, |
const string & | text, | ||
ActionType | failAction, | ||
bool | caseSensitive = true |
||
) |
bool Facilita::ExtractorWithActions::verifyContains | ( | const string & | text, |
bool | caseSensitive = true |
||
) |
Verify a string can be found in the data of this object.
text | A string of text to be searched for. |
caseSensitive | Indicate if search is to be case sensitive. |
bool Facilita::ExtractorWithActions::verifyContains | ( | const string & | text, |
ActionType | failAction, | ||
bool | caseSensitive | ||
) |