6 #pragma warning (disable : 4251) 7 #pragma warning (disable : 4635) 17 #include "CharacterEncoding.h" 18 #include "VirtualUserInterface.h" 36 Extractor& operator=(
const string& data);
46 bool find(
ExtractionCursor &cursor,
const string& text,
bool caseSensitive =
true);
56 bool rfind(
ExtractionCursor &cursor,
const string& text,
bool caseSensitive =
true);
68 string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
const string& defaultValue,
bool caseSensitive =
true);
70 string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
const string& defaultValue,
bool caseSensitive =
true);
83 string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
const string& defaultValue,
bool caseSensitive =
true);
85 string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
const string& defaultValue,
bool caseSensitive =
true);
98 string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
bool caseSensitive =
true);
101 string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
bool caseSensitive =
true);
114 string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
bool caseSensitive =
true);
116 string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
bool caseSensitive =
true);
130 string extractRegExp(
ExtractionCursor &cursor,
const string& beforeRegExp,
const string& afterRegExp,
bool caseSensitive =
true);
131 string extractRegExpFromEnd(
ExtractionCursor &cursor,
const string& afterRegExp,
const string& beforeRegExp,
bool caseSensitive =
true);
139 bool verifyContains(
const string &text,
bool caseSensitive =
true);
141 virtual StringVector extractList(
const string& before,
const string& after,
bool caseSensitive =
true,
int maxItems = -1);
142 virtual StringVector extractList(
ExtractionCursor &cursor,
const string& before,
const string& after,
const string& endAt =
"",
bool caseSensitive =
true,
int maxItems = -1);
147 const string path()
const {
return _path;}
151 const string&
data()
const {
return _data;}
160 void rewind() {_currentPosition = _rewindPosition;}
164 string stringAtCurrentPosition(
int len)
const;
166 int findString(
int startPos,
const string& str,
bool caseSensitive =
true);
167 int rfindString(
int startPos,
const string& str,
bool caseSensitive =
true);
168 bool findPtr(
int startPos,
const StringVector& before,
const char* pAfterString,
bool casesensitive,
char** pMatchedString,
int& matchedStringPos,
int& matchedStringlength);
170 bool rfindPtr(
int startPos,
const StringVector& after,
const char* pBeforeString,
bool casesensitive,
char** pMatchedString,
int& matchedStringPos,
int& matchedStringlength);
172 int findString(
int startPos,
const char* pBeforeString,
bool casesensitive);
173 int rfindString(
int startPos,
const char* str);
174 int rfindStringIc(
int startPos,
const char* str);
175 const char* getKeywordValue(
const char* keyword,
int& valueLen,
bool bRemoveQuotes);
176 int findStringCheckIc(
int startPos,
const char*
string,
const char checkChar,
bool skipQuotes,
int endPos=0);
177 int findStringCheck(
int startPos,
const char* str,
const char checkChar);
178 void skipToStringIc(
const char* pTag);
179 virtual void setCharEncoding(
const string& charEncoding);
180 virtual string getCharEncoding();
183 #pragma warning (disable : 4251) 186 string _charEncoding;
187 #pragma warning(default:4251) 188 int _currentPosition;
190 int _endSearchPosition;
194 class FC_API ExtractorWithActionsInterface:
public CharacterEncoding
197 virtual ~ExtractorWithActionsInterface() {}
198 virtual bool find(
ExtractionCursor &cursor,
const string& text,
bool caseSensitive)= 0;
199 virtual bool rfind(
ExtractionCursor &cursor,
const string& text,
bool caseSensitive)= 0;
201 virtual string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
const string& defaultValue,
bool caseSensitive)= 0;
202 virtual string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
const string& defaultValue,
bool caseSensitive) = 0;
204 virtual string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
const string& defaultValue,
bool caseSensitive)= 0;
205 virtual string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
const string& defaultValue,
bool caseSensitive) = 0;
207 virtual string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
bool caseSensitive)= 0;
208 virtual string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
bool caseSensitive) = 0;
210 virtual string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
bool caseSensitive)= 0;
211 virtual string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
bool caseSensitive) = 0;
214 virtual string extractRegExp(
ExtractionCursor &cursor,
const string& beforeRegExp,
const string& afterRegExp,
bool caseSensitive =
true) = 0;
215 virtual string extractRegExpFromEnd(
ExtractionCursor &cursor,
const string& afterRegExp,
const string& beforeRegExp,
bool caseSensitive =
true) = 0;
216 virtual bool verifyContains(
const string &text,
bool caseSensitive) = 0;
217 virtual bool find(
ExtractionCursor &cursor,
const string& text, ActionType failAction,
bool caseSensitive) = 0;
218 virtual bool rfind(
ExtractionCursor &cursor,
const string& text, ActionType failAction,
bool caseSensitive) = 0;
221 virtual string extract(
ExtractionCursor &cursor,
const string& before,
const string& after, ActionType failAction,
bool caseSensitive) = 0;
222 virtual string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before, ActionType failAction,
bool caseSensitive) = 0;
224 virtual string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after, ActionType failAction,
bool caseSensitive) = 0;
225 virtual string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before, ActionType failAction,
bool caseSensitive) = 0;
227 virtual string extractRegExp(
ExtractionCursor &cursor,
const string& beforeRegExp,
const string& afterRegExp, ActionType failAction,
bool caseSensitive =
true) = 0;
228 virtual string extractRegExpFromEnd(
ExtractionCursor &cursor,
const string& afterRegExp,
const string& beforeRegExp, ActionType failAction,
bool caseSensitive =
true) = 0;
229 virtual bool verifyContains(
const string &text, ActionType failAction,
bool caseSensitive) = 0;
247 bool find(
ExtractionCursor& cursor,
const string& text,
bool caseSensitive =
true);
249 bool rfind(
ExtractionCursor &cursor,
const string& text,
bool caseSensitive =
true);
251 string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
const string& defaultValue,
bool caseSensitive =
true);
253 string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
const string& defaultValue,
bool caseSensitive =
true);
256 string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
const string& defaultValue,
bool caseSensitive =
true);
258 string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
const string& defaultValue,
bool caseSensitive =
true);
262 string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after,
bool caseSensitive =
true);
264 string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before,
bool caseSensitive =
true);
268 string extract(
ExtractionCursor &cursor,
const string& before,
const string& after,
bool caseSensitive =
true);
270 string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before,
bool caseSensitive =
true);
275 string extractRegExp(
ExtractionCursor &cursor,
const string& beforeRegExp,
const string& afterRegExp,
bool caseSensitive =
true);
276 string extractRegExpFromEnd(
ExtractionCursor &cursor,
const string& afterRegExp,
const string& beforeRegExp,
bool caseSensitive =
true);
286 bool verifyContains(
const string &text,
bool caseSensitive =
true);
288 bool find(
ExtractionCursor &cursor,
const string& text, ActionType failAction,
bool caseSensitive =
true);
289 bool rfind(
ExtractionCursor &cursor,
const string& text, ActionType failAction,
bool caseSensitive =
true);
303 string extract(
ExtractionCursor &cursor,
const string& before,
const string& after, ActionType failAction,
bool caseSensitive =
true);
305 string extractFromEnd(
ExtractionCursor &cursor,
const string& after,
const string& before, ActionType failAction,
bool caseSensitive =
true);
320 string extract(
ExtractionCursor &cursor,
const StringVector& before,
const string& after, ActionType failAction,
bool caseSensitive =
true);
322 string extractFromEnd(
ExtractionCursor &cursor,
const StringVector& after,
const string& before, ActionType failAction,
bool caseSensitive =
true);
324 string extractRegExp(
ExtractionCursor &cursor,
const string& beforeRegExp,
const string& afterRegExp, ActionType failAction,
bool caseSensitive =
true);
325 string extractRegExpFromEnd(
ExtractionCursor &cursor,
const string& afterRegExp,
const string& beforeRegExp, ActionType failAction,
bool caseSensitive =
true);
326 bool verifyContains(
const string &text, ActionType failAction,
bool caseSensitive);
328 VirtualUserInterface*
getVU() {
return _vu;}
331 VirtualUserInterface* _vu;
vector< RegExpMatch > RegExpMatchList
Definition: RegExpMatch.h:41
Definition: IpEndPoint.h:9