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 namespace P6R {
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
33 const P6WSPLITFLAGS P6WSPLIT_NOFLAGS = 0x00000000;
34 
42 typedef struct
43 {
44  P6UINT32 offset; // -> start of chunk
45  P6UINT32 length; // -> length of chunk in characters
47 
48 
58 {
73  P6COMMETHOD next( P6UINT32 cElements, P6WSPLITCHUNK* parElements, P6UINT32* pcReturned ) = 0;
74 
83  P6COMMETHOD reset() = 0;
84 };
85 #define IF_p6IEnumWSplitChunks {0xd789c4b9,0x4818,0x4e94,{0xad,0x5a,0x9b,0x47,0x60,0x8b,0xe4,0x70}}
86 
87 
97 interface p6IWSplit : p6ICom
98 {
109  P6COMMETHOD initialize( P6WSPLITFLAGS flags ) = 0;
110 
125  P6COMMETHOD setLocale( const P6CHAR* pLocale ) = 0;
126 
155  P6COMMETHOD split( const P6WCHAR* pRegex,
156  P6WREGEXMODIFIER modifiers,
157  const P6WCHAR* pTargetStr,
158  P6UINT32 chunkLimit,
159  p6IEnumWSplitChunks** ppEnum ) = 0;
160 
179  P6COMMETHOD explode( const P6WCHAR* pDelimiter,
180  const P6WCHAR* pString,
181  P6UINT32 limit,
182  p6IEnumWSplitChunks** ppEnum ) = 0;
183 };
184 
185 
186 // {0148CDF2-E5F4-4067-97D0-F4CD437FB108}
187 #define IF_p6IWSplit {0x148cdf2,0xe5f4,0x4067,{0x97,0xd0,0xf4,0xcd,0x43,0x7f,0xb1,0x8}}
188 
189 // {9B16B3AD-3FE5-4c74-96A9-5067444B8EBD}
190 #define COMP_p6WSplit {0x9b16b3ad,0x3fe5,0x4c74,{0x96,0xa9,0x50,0x67,0x44,0x4b,0x8e,0xbd}}
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 } // namespace
197 
198 #endif
199 
200 
201 
virtual P6R::P6ERR reset()=0
This method is used to re-start the enumerator at the beginning.
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR initialize(P6WSPLITFLAGS flags)=0
This function ensures that this object is in its proper initial state.
Standard error codes.
virtual P6R::P6ERR next(P6UINT32 cElements, P6WSPLITCHUNK *parElements, P6UINT32 *pcReturned)=0
This method is used to iterate the parsed chunks from the original target string. ...
Given to an application as a result of a call to p6IWSplit::split() or p6IWSplit::explode().
Definition: p6wsplit.h:57
virtual P6R::P6ERR explode(const P6WCHAR *pDelimiter, const P6WCHAR *pString, P6UINT32 limit, p6IEnumWSplitChunks **ppEnum)=0
Similar to the PHP explode() function.
virtual P6R::P6ERR setLocale(const P6CHAR *pLocale)=0
This method allows the caller to set the locale that will be used during split and explode calls...
Interface definition for the Wide Character Regular Expression Engine.
virtual P6R::P6ERR split(const P6WCHAR *pRegex, P6WREGEXMODIFIER modifiers, const P6WCHAR *pTargetStr, P6UINT32 chunkLimit, p6IEnumWSplitChunks **ppEnum)=0
A wide character split parsing funtion.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
P6UINT32 length
Definition: p6wsplit.h:45
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
P6COM base interface definitions.
P6UINT32 offset
Definition: p6wsplit.h:44
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:97
Each chunk is defined as an offset into the orginal target string and a length of that chunk...
Definition: p6wsplit.h:42
const P6WSPLITFLAGS P6WSPLIT_NOFLAGS
Definition: p6wsplit.h:33
#define P6COMMETHOD
Definition: p6types.h:872
P6UINT32 P6WSPLITFLAGS
P6WSPLITFLAGS.
Definition: p6wsplit.h:32
char P6CHAR
Narrow character type.
Definition: p6types.h:71