Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6stringbuf.h
Go to the documentation of this file.
1 
5 #ifndef P6STRINGBUF_H__
6 #define P6STRINGBUF_H__ 1
7 
8 #include "p6err.h"
9 #include "p6runtimeif.h"
10 
11 namespace P6R {
12 
14  const P6STRBUFFLAGS P6SBF_NOFLAGS = 0x00000000;
15 
21  interface p6IStringBuf : public p6ICom
22  {
34  P6COMMETHOD initialize(P6R::P6SIZE cInitialSize,const P6R::P6CHAR *pInitialData,P6STRBUFFLAGS fFlags) = 0;
35 
43  P6COMMETHOD append(const P6R::P6CHAR *pData) = 0;
44 
52  P6COMMETHOD appendBCSTR(const P6R::P6BCSTR *pData) = 0;
53 
66  P6COMMETHOD appendSubStr(const P6R::P6CHAR *pData,P6R::P6SIZE nOffset,P6R::P6SIZE nChars) = 0;
67 
75  P6COMMETHOD prepend(const P6R::P6CHAR *pData) = 0;
76 
84  P6COMMETHOD prependBCSTR(const P6R::P6BCSTR *pData) = 0;
85 
98  P6COMMETHOD prependSubStr(const P6R::P6CHAR *pData,P6R::P6SIZE nOffset,P6R::P6SIZE nChars) = 0;
99 
113  P6COMMETHOD getBufPtr(const P6R::P6CHAR **ppData,P6R::P6SIZE *pcData) = 0;
114 
121  P6COMMETHOD size(P6R::P6SIZE *pcData) = 0;
122 
128  P6COMMETHOD clear() = 0;
129  };
130 
131  // {8BCF8C01-C750-4E0C-8C86-638F7127A02D}
132  #define IF_p6IStringBuf {0x8BCF8C01,0xC750,0x4E0C,{0x8C,0x86,0x63,0x8F,0x71,0x27,0xA0,0x2D}}
133 
134  // {23E0E1E7-FCD5-41B2-A2A9-12C08D053613}
135  #define COMP_p6StringBuf {0x23E0E1E7,0xFCD5,0x41B2,{0xA2,0xA9,0x12,0xC0,0x8D,0x05,0x36,0x13}}
136 
137 
138  interface p6IWStringBuf : public p6ICom
139  {
151  P6COMMETHOD initialize(P6R::P6SIZE cInitialSize,const P6R::P6WCHAR *pInitialData,P6STRBUFFLAGS fFlags) = 0;
152 
161  P6COMMETHOD append(const P6R::P6WCHAR *pData) = 0;
162 
170  P6COMMETHOD appendBWCSTR(const P6R::P6BWCSTR *pData) = 0;
171 
172 
185  P6COMMETHOD appendSubStr(const P6R::P6WCHAR *pData,P6R::P6SIZE nOffset,P6R::P6SIZE nChars) = 0;
186 
194  P6COMMETHOD prepend(const P6R::P6WCHAR *pData) = 0;
195 
203  P6COMMETHOD prependBWCSTR(const P6R::P6BWCSTR *pData) = 0;
204 
217  P6COMMETHOD prependSubStr(const P6R::P6WCHAR *pData,P6R::P6SIZE nOffset,P6R::P6SIZE nChars) = 0;
218 
232  P6COMMETHOD getBufPtr(const P6R::P6WCHAR **ppData,P6R::P6SIZE *pcData) = 0;
233 
240  P6COMMETHOD size(P6R::P6SIZE *pcData) = 0;
241 
247  P6COMMETHOD clear() = 0;
248 
258  P6COMMETHOD trim(P6R::P6SIZE cChars) = 0;
259  };
260 
261  // {6E3FB49E-FB69-4930-B9B7-134777837B1F}
262  #define IF_p6IWStringBuf {0x6E3FB49E,0xFB69,0x4930,{0xB9,0xB7,0x13,0x47,0x77,0x83,0x7B,0x1F}}
263 
264  // {0EC58863-B4F6-49EF-98B3-3FBE27A30C3F}
265  #define COMP_p6WStringBuf {0x0EC58863,0xB4F6,0x49EF,{0x98,0xB3,0x3F,0xBE,0x27,0xA3,0x0C,0x3F}}
266 
267 
268 } // namespace
269 
270 #endif
size_t P6SIZE
Definition: p6types.h:62
Const Binary string.
Definition: p6types.h:168
const P6STRBUFFLAGS P6SBF_NOFLAGS
Definition: p6stringbuf.h:14
virtual P6R::P6ERR appendSubStr(const P6R::P6CHAR *pData, P6R::P6SIZE nOffset, P6R::P6SIZE nChars)=0
Appends to sepified substring to the string buffer.
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR getBufPtr(const P6R::P6WCHAR **ppData, P6R::P6SIZE *pcData)=0
Retrieves a pointer to the string buffers undelying storage and the number of valid bytes available...
virtual P6R::P6ERR prepend(const P6R::P6WCHAR *pData)=0
Prepends the specified string to the beginning of the string buffer.
virtual P6R::P6ERR appendBCSTR(const P6R::P6BCSTR *pData)=0
Appends the specified P6BCSTR to the string buffer.
Standard error codes.
virtual P6R::P6ERR prependSubStr(const P6R::P6CHAR *pData, P6R::P6SIZE nOffset, P6R::P6SIZE nChars)=0
Prepends to sepified substring to the string buffer.
Wide Const binary string.
Definition: p6types.h:200
virtual P6R::P6ERR appendSubStr(const P6R::P6WCHAR *pData, P6R::P6SIZE nOffset, P6R::P6SIZE nChars)=0
Appends to sepified substring to the string buffer.
virtual P6R::P6ERR clear()=0
Resets the string buffer to empty.
P6UINT32 P6STRBUFFLAGS
Definition: p6stringbuf.h:13
virtual P6R::P6ERR prependBCSTR(const P6R::P6BCSTR *pData)=0
Prepends the specfified P6BWCSTR to the string buffer.
virtual P6R::P6ERR prependSubStr(const P6R::P6WCHAR *pData, P6R::P6SIZE nOffset, P6R::P6SIZE nChars)=0
Prepends to sepified substring to the string buffer.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR initialize(P6R::P6SIZE cInitialSize, const P6R::P6WCHAR *pInitialData, P6STRBUFFLAGS fFlags)=0
Initializes the component for use and must be called successfully before any other method...
virtual P6R::P6ERR size(P6R::P6SIZE *pcData)=0
Returns the size in characters (without a NULL terminator) of the data in the buffer.
virtual P6R::P6ERR append(const P6R::P6CHAR *pData)=0
Appends the specified NULL terminated ASCII string.
P6COM runtime interfaces definitions.
virtual P6R::P6ERR initialize(P6R::P6SIZE cInitialSize, const P6R::P6CHAR *pInitialData, P6STRBUFFLAGS fFlags)=0
Initializes the component for use and must be called successfully before any other method...
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR append(const P6R::P6WCHAR *pData)=0
Appends the NULL terminated string provided in pData to the string buffer.
virtual P6R::P6ERR clear()=0
Resets the string buffer to empty.
virtual P6R::P6ERR getBufPtr(const P6R::P6CHAR **ppData, P6R::P6SIZE *pcData)=0
Retrieves a pointer to the string buffers undelying storage and the number of valid bytes available...
Make appending data as fast as possible.
Definition: p6stringbuf.h:21
virtual P6R::P6ERR appendBWCSTR(const P6R::P6BWCSTR *pData)=0
Appends the specified P6BWCSTR to the string buffer.
virtual P6R::P6ERR size(P6R::P6SIZE *pcData)=0
Returns the size in characters (without a NULL terminator) of the data in the buffer.
virtual P6R::P6ERR prependBWCSTR(const P6R::P6BWCSTR *pData)=0
Prepends the specfified P6BWCSTR to the string buffer.
virtual P6R::P6ERR trim(P6R::P6SIZE cChars)=0
Trims the up to the specified number of character from the end of the string.
virtual P6R::P6ERR prepend(const P6R::P6CHAR *pData)=0
Prepends the specified string to the beginning of the string buffer.
char P6CHAR
Narrow character type.
Definition: p6types.h:71