Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6wsplit.h
Go to the documentation of this file.
1 
12 #ifndef P6WSPLIT_H__
13 #define P6WSPLIT_H__ 1
14 
15 #include "p6err.h"
16 #include "p6comdef.h"
17 #include "p6wregex.h"
18 
19 
20 #ifdef __cplusplus
21 namespace P6R {
22 extern "C" {
23 #endif
24 
32 static const P6WSPLITFLAGS P6WSPLIT_NOFLAGS = 0x00000000;
33 
41 typedef struct
42 {
43  P6UINT32 offset; // -> start of chunk
44  P6UINT32 length; // -> length of chunk in characters
46 
47 
56 #undef INTERFACE
57 #define INTERFACE p6IEnumWSplitChunks
59 {
74  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6WSPLITCHUNK* parElements, P6UINT32* pcReturned ) P6PURE;
75 
85 };
86 #define IF_p6IEnumWSplitChunks {0xd789c4b9,0x4818,0x4e94,{0xad,0x5a,0x9b,0x47,0x60,0x8b,0xe4,0x70}}
87 
88 
98 #undef INTERFACE
99 #define INTERFACE p6IWSplit
101 {
112  P6DECLCOMMETHOD(initialize)(P6THIS_ P6WSPLITFLAGS flags ) P6PURE;
113 
128  P6DECLCOMMETHOD(setLocale)(P6THIS_ const P6CHAR* pLocale ) P6PURE;
129 
158  P6DECLCOMMETHOD(split)(P6THIS_ const P6WCHAR* pRegex,
159  P6WREGEXMODIFIER modifiers,
160  const P6WCHAR* pTargetStr,
161  P6UINT32 chunkLimit,
162  p6IEnumWSplitChunks** ppEnum ) P6PURE;
163 
182  P6DECLCOMMETHOD(explode)(P6THIS_ const P6WCHAR* pDelimiter,
183  const P6WCHAR* pString,
184  P6UINT32 limit,
185  p6IEnumWSplitChunks** ppEnum ) P6PURE;
186 };
187 
188 
189 // {0148CDF2-E5F4-4067-97D0-F4CD437FB108}
190 #define IF_p6IWSplit {0x148cdf2,0xe5f4,0x4067,{0x97,0xd0,0xf4,0xcd,0x43,0x7f,0xb1,0x8}}
191 
192 // {9B16B3AD-3FE5-4c74-96A9-5067444B8EBD}
193 #define COMP_p6WSplit {0x9b16b3ad,0x3fe5,0x4c74,{0x96,0xa9,0x50,0x67,0x44,0x4b,0x8e,0xbd}}
194 
195 #ifdef __cplusplus
196 }
197 } // namespace
198 #endif
199 
200 
201 #endif
202 
203 
204 
uint32_t P6UINT32
Definition: p6types.h:77
#define P6PURE
Definition: p6defs.h:192
Standard error codes.
Given to an application as a result of a call to p6IWSplit::split() or p6IWSplit::explode().
Definition: p6wsplit.h:58
Interface definition for the Wide Character Regular Expression Engine.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
P6UINT32 length
Definition: p6wsplit.h:44
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
P6COM base interface definitions.
P6UINT32 offset
Definition: p6wsplit.h:43
P6UINT32 P6WREGEXMODIFIER
P6WREGEXMODIFIER: Regex Modifier.
Definition: p6wregex.h:81
This interface provides a wide version of a simplified version of Perl's Split function.
Definition: p6wsplit.h:100
Each chunk is defined as an offset into the orginal target string and a length of that chunk...
Definition: p6wsplit.h:41
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6UINT32 P6WSPLITFLAGS
P6WSPLITFLAGS.
Definition: p6wsplit.h:31
#define P6THIS_
Definition: p6defs.h:193
#define P6THIS
Definition: p6defs.h:194
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188