p6split.h

Go to the documentation of this file.
00001 
00012 #ifndef P6SPLIT_H__
00013 #define P6SPLIT_H__ 1
00014 
00015 #include "p6err.h"
00016 #include "p6comdef.h"
00017 #include "p6regex.h"
00018 
00019 
00020 namespace P6R {
00021 
00022 #ifdef  __cplusplus
00023 extern "C" {
00024 #endif
00025 
00033 typedef P6UINT32 P6SPLITFLAGS;
00034 const P6SPLITFLAGS P6SPLIT_NOFLAGS = 0x00000000;     
00035 
00043 typedef struct 
00044 {
00045    P6UINT32 offset;    // -> start of chunk
00046    P6UINT32 length;    // -> length of chunk in characters
00047 } P6SPLITCHUNK;
00048 
00049 
00058 interface p6IEnumSplitChunks : p6ICom
00059 {
00074    P6COMMETHOD  next( P6UINT32 cElements, P6SPLITCHUNK* parElements, P6UINT32* pcReturned ) = 0;
00075 
00084    P6COMMETHOD  reset() = 0;
00085 };
00086 #define IF_p6IEnumSplitChunks {0x3ee8153e,0xba3,0x4ced,{0x86,0xf3,0xd2,0xfe,0xcb,0x4c,0x2,0x6a}}
00087 
00088 
00098 interface p6ISplit : p6ICom
00099 {
00110    P6COMMETHOD  initialize( P6SPLITFLAGS flags ) = 0;
00111 
00140    P6COMMETHOD split( const P6CHAR*        pRegex, 
00141                   P6REGEXMODIFIER      modifiers, 
00142                   const P6CHAR*        pTargetStr, 
00143                   P6UINT32             chunkLimit,
00144                   p6IEnumSplitChunks** ppEnum ) = 0;
00145 
00164    P6COMMETHOD explode( const P6CHAR*        pDelimiter, 
00165                     const P6CHAR*        pString, 
00166                     P6UINT32             limit,
00167                     p6IEnumSplitChunks** ppEnum ) = 0;
00168 };
00169 
00170 // {E60619FA-0D30-45de-8DEF-F844D8224824}
00171 #define IF_p6ISplit  {0xe60619fa,0xd30,0x45de,{0x8d,0xef,0xf8,0x44,0xd8,0x22,0x48,0x24}}
00172 
00173 // {745F117C-F74F-4cdd-859A-705F0C203759}
00174 #define COMP_p6Split {0x745f117c,0xf74f,0x4cdd,{0x85,0x9a,0x70,0x5f,0xc,0x20,0x37,0x59}}
00175 
00176 
00177 #ifdef  __cplusplus
00178 }
00179 #endif
00180 
00181 } // namespace
00182 
00183 #endif
00184 
00185 
00186 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.