Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6wregex.h
Go to the documentation of this file.
1 
10 #ifndef P6WREGEX_H__
11 #define P6WREGEX_H__ 1
12 
13 #include "p6com.h"
14 
15 
16 #ifdef __cplusplus
17 namespace P6R {
18 extern "C" {
19 #endif
20 
34 typedef enum {
40 } P6WREGEXMODE;
41 
82 static const P6WREGEXMODIFIER P6MOD_NULL = 0x00000000;
83 static const P6WREGEXMODIFIER P6MOD_INSENSITIVE = 0x00000001;
84 static const P6WREGEXMODIFIER P6MOD_MULTILINE = 0x00000002;
85 static const P6WREGEXMODIFIER P6MOD_NEWLINE = 0x00000004;
86 static const P6WREGEXMODIFIER P6MOD_FASTGREEDY = 0x00000008;
87 static const P6WREGEXMODIFIER P6MOD_GLOBAL = 0x00000010;
88 static const P6WREGEXMODIFIER P6MOD_FULLLOOKBEHIND = 0x00000020;
89 static const P6WREGEXMODIFIER P6MOD_SKIPWHITESPACE = 0x00000040;
90 
103 static const P6WREGEXTRACELEVEL P6WREGEX_TRACE_OFF = 0x00000000;
104 static const P6WREGEXTRACELEVEL P6WREGEX_TRACE_BASIC = 0x00000001;
105 static const P6WREGEXTRACELEVEL P6WREGEX_TRACE_DEBUG = 0x00000002;
106 
114 static const P6WREGEXFLAGS P6WREGEX_NOFLAGS = 0x00000000;
115 
120 typedef const P6WCHAR* (*P6WREGEXREPLACECB)( const P6WCHAR* pMatchedText, P6VOID *pCtx );
121 
122 
129 #undef INTERFACE
130 #define INTERFACE p6IWRegexMatch
132 {
146  P6DECLCOMMETHOD(next)(P6THIS_ const P6WCHAR** pResult ) P6PURE;
147 
156  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
157 };
158 #define IF_p6IWRegexMatch {0x25845EAC,0xC253,0x4409,{0x85,0x09,0xD3,0xD7,0xBC,0x9B,0x9D,0xE0}}
159 
160 
171 #undef INTERFACE
172 #define INTERFACE p6IWRegex
174 {
186  P6DECLCOMMETHOD(initialize)(P6THIS_ P6WREGEXFLAGS flags, P6WREGEXMODE mode ) P6PURE;
187 
202  P6DECLCOMMETHOD(setLocale)(P6THIS_ const P6CHAR* pLocale ) P6PURE;
203 
215  P6DECLCOMMETHOD(setTrace)(P6THIS_ P6WREGEXTRACELEVEL level ) P6PURE;
216 
234  P6DECLCOMMETHOD(compile)(P6THIS_ const P6WCHAR* pRegex,
235  P6WREGEXMODIFIER modifiers
236  ) P6PURE;
237 
261  P6DECLCOMMETHOD(match)(P6THIS_ const P6WCHAR* pMatch,
262  P6WREGEXMODIFIER modifiers
263  ) P6PURE;
264 
305  P6DECLCOMMETHOD(search)(P6THIS_ const P6WCHAR* pSearch,
306  P6WREGEXMODIFIER modifiers,
307  P6UINT32* pOffset,
308  P6UINT32* pLength
309  ) P6PURE;
310 
340  P6DECLCOMMETHOD(replace)(P6THIS_ const P6WCHAR* pSearch,
341  P6WREGEXMODIFIER modifiers,
342  const P6WCHAR* pReplace,
343  P6WCHAR* pResult,
344  P6UINT32 cBuffer,
345  P6UINT32* pWritten
346  ) P6PURE;
347 
373  P6DECLCOMMETHOD(replaceInPlace)(P6THIS_ P6WCHAR* pSearch,
374  P6WREGEXMODIFIER modifiers,
375  const P6WCHAR* pReplace,
376  P6UINT32* pSize
377  ) P6PURE;
378 
411  P6DECLCOMMETHOD(replaceWithCallback)(P6THIS_ const P6WCHAR* pSearch,
412  P6WREGEXMODIFIER modifiers,
413  P6WREGEXREPLACECB pfn,
414  P6VOID* pCtx,
415  p6IWRegexMatch** pResult
416  ) P6PURE;
417 
437  P6DECLCOMMETHOD(getCaptureText)(P6THIS_ P6UINT32 index, P6UINT32* pOffset, P6UINT32* pLength ) P6PURE;
438 
459  P6DECLCOMMETHOD(getNamedCaptureText)(P6THIS_ const P6WCHAR* pName, P6UINT32* pOffset, P6UINT32* pLength ) P6PURE;
460 
480  P6DECLCOMMETHOD(setBackTrackLimits)(P6THIS_ P6UINT32 maxBackStack, P6UINT32 maxBackTracks ) P6PURE;
481 };
482 
483 // {3E3CF731-11EA-47c7-A95A-E15107286211}
484 #define IF_p6IWRegex {0x3e3cf731,0x11ea,0x47c7,{0xa9,0x5a,0xe1,0x51,0x7,0x28,0x62,0x11}}
485 
486 // {8CEBAED1-228D-4729-AF59-140480D897F7}
487 #define COMP_p6WRegex {0x8cebaed1,0x228d,0x4729,{0xaf,0x59,0x14,0x4,0x80,0xd8,0x97,0xf7}}
488 
489 #ifdef __cplusplus
490 }
491 } // namespace
492 #endif
493 
494 
495 #endif
496 
497 
498 
499 
500 
P6WREGEXMODE
This type defines the supported compatitbility modes with other regular expression engines...
Definition: p6wregex.h:34
uint32_t P6UINT32
Definition: p6types.h:77
#define P6PURE
Definition: p6defs.h:192
Return zero or more strings resulting from a regex operation.
Definition: p6wregex.h:131
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
const P6WCHAR *(* P6WREGEXREPLACECB)(const P6WCHAR *pMatchedText, P6VOID *pCtx)
Used for the replaceWithCallBack() function.
Definition: p6wregex.h:120
This interface provides access the to the wide string (patform wchar_t) regular expression engine and...
Definition: p6wregex.h:173
P6UINT32 P6WREGEXTRACELEVEL
P6WREGEXTRACELEVEL.
Definition: p6wregex.h:102
P6UINT32 P6WREGEXMODIFIER
P6WREGEXMODIFIER: Regex Modifier.
Definition: p6wregex.h:81
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
P6UINT32 P6WREGEXFLAGS
P6WREGEXFLAGS.
Definition: p6wregex.h:113
P6COM definitions and interfaces.
void P6VOID
Definition: p6types.h:109
#define P6THIS
Definition: p6defs.h:194
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188