7 #ifndef __platform_regex_h__ 8 #define __platform_regex_h__ 16 typedef void* (FE_CDECL RegexInitFunction)(
const char* a_pattern);
17 typedef void* (FE_CDECL RegexMatchFunction)(
void* a_expression,
const char* a_candidate);
18 typedef const char* (FE_CDECL RegexResultFunction)(
void* a_result,U32 a_index);
19 typedef void* (FE_CDECL RegexReplaceFunction)(
void* a_expression,
20 const char* a_candidate,
const char* a_replacement);
21 typedef void (FE_CDECL RegexFinishFunction)(
void* a_expression);
22 typedef void (FE_CDECL RegexReleaseFunction)(
void* a_result);
26 FE_MEM_PORT
extern RegexInitFunction* gs_fnRegexInit;
27 FE_MEM_PORT
extern RegexMatchFunction* gs_fnRegexMatch;
28 FE_MEM_PORT
extern RegexMatchFunction* gs_fnRegexSearch;
29 FE_MEM_PORT
extern RegexResultFunction* gs_fnRegexResult;
30 FE_MEM_PORT
extern RegexReplaceFunction* gs_fnRegexReplace;
31 FE_MEM_PORT
extern RegexFinishFunction* gs_fnRegexFinish;
32 FE_MEM_PORT
extern RegexReleaseFunction* gs_fnRegexRelease;
33 FE_MEM_PORT
extern BWORD gs_regexChecked;
35 class FE_DL_PUBLIC FE_DL_EXPORT Regex
38 Regex(
const char* a_pattern);
40 BWORD match(
const char* a_candidate);
41 BWORD search(
const char* a_candidate);
42 const char* replace(
const char* a_candidate,
const char* a_replacement);
43 const char* result(U32 a_index);
45 static void replaceInitFunction(RegexInitFunction* a_fnInit)
46 { gs_fnRegexInit=a_fnInit; }
47 static void replaceMatchFunction(RegexMatchFunction* a_fnMatch)
48 { gs_fnRegexMatch=a_fnMatch; }
49 static void replaceSearchFunction(RegexMatchFunction* a_fnSearch)
50 { gs_fnRegexSearch=a_fnSearch; }
51 static void replaceResultFunction(RegexResultFunction* a_fnResult)
52 { gs_fnRegexResult=a_fnResult; }
53 static void replaceReplaceFunction(RegexReplaceFunction* a_fnReplace)
54 { gs_fnRegexReplace=a_fnReplace; }
55 static void replaceFinishFunction(RegexFinishFunction* a_fnFinish)
56 { gs_fnRegexFinish=a_fnFinish; }
57 static void replaceReleaseFunction(RegexReleaseFunction* a_fnRelease)
58 { gs_fnRegexRelease=a_fnRelease; }
60 static BWORD confirm(String a_hint=
"");
kernel
Definition: namespace.dox:3