Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6split.h
Go to the documentation of this file.
1 
12 #ifndef P6SPLIT_H__
13 #define P6SPLIT_H__ 1
14 
15 #include "p6err.h"
16 #include "p6comdef.h"
17 #include "p6regex.h"
18 
19 
20 #ifdef __cplusplus
21 namespace P6R {
22 extern "C" {
23 #endif
24 
33 static const P6SPLITFLAGS P6SPLIT_NOFLAGS = 0x00000000;
34 
42 typedef struct
43 {
44  P6UINT32 offset; // -> start of chunk
45  P6UINT32 length; // -> length of chunk in characters
46 } P6SPLITCHUNK;
47 
48 
57 #undef INTERFACE
58 #define INTERFACE p6IEnumSplitChunks
60 {
75  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6SPLITCHUNK* parElements, P6UINT32* pcReturned ) P6PURE;
76 
86 };
87 #define IF_p6IEnumSplitChunks {0x3ee8153e,0xba3,0x4ced,{0x86,0xf3,0xd2,0xfe,0xcb,0x4c,0x2,0x6a}}
88 
89 
99 #undef INTERFACE
100 #define INTERFACE p6ISplit
102 {
113  P6DECLCOMMETHOD(initialize)(P6THIS_ P6SPLITFLAGS flags ) P6PURE;
114 
143  P6DECLCOMMETHOD(split)(P6THIS_ const P6CHAR* pRegex,
144  P6REGEXMODIFIER modifiers,
145  const P6CHAR* pTargetStr,
146  P6UINT32 chunkLimit,
147  p6IEnumSplitChunks** ppEnum ) P6PURE;
148 
167  P6DECLCOMMETHOD(explode)(P6THIS_ const P6CHAR* pDelimiter,
168  const P6CHAR* pString,
169  P6UINT32 limit,
170  p6IEnumSplitChunks** ppEnum ) P6PURE;
171 };
172 
173 // {E60619FA-0D30-45de-8DEF-F844D8224824}
174 #define IF_p6ISplit {0xe60619fa,0xd30,0x45de,{0x8d,0xef,0xf8,0x44,0xd8,0x22,0x48,0x24}}
175 
176 // {745F117C-F74F-4cdd-859A-705F0C203759}
177 #define COMP_p6Split {0x745f117c,0xf74f,0x4cdd,{0x85,0x9a,0x70,0x5f,0xc,0x20,0x37,0x59}}
178 
179 
180 #ifdef __cplusplus
181 }
182 } // namespace
183 #endif
184 
185 
186 #endif
187 
188 
189 
uint32_t P6UINT32
Definition: p6types.h:77
Each chunk is defined as an offset into the orginal target string and a length of that chunk...
Definition: p6split.h:42
#define P6PURE
Definition: p6defs.h:192
Standard error codes.
P6UINT32 offset
Definition: p6split.h:44
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
P6COM base interface definitions.
P6UINT32 length
Definition: p6split.h:45
This interface provides a narrow version of a simplified version of Perl's Split function.
Definition: p6split.h:101
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
P6UINT32 P6REGEXMODIFIER
This type defines how to modify (or adjust) the matching process.
Definition: p6regex.h:83
P6UINT32 P6SPLITFLAGS
P6SPLITFLAGS.
Definition: p6split.h:32
#define P6THIS
Definition: p6defs.h:194
Interface definition for the Regular Expression Engine.
char P6CHAR
Narrow character type.
Definition: p6types.h:105
Given to an application as a result of a call to p6ISplit::split() or p6ISplit::explode().
Definition: p6split.h:59
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188