Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6i18n.h
Go to the documentation of this file.
1 
18 #ifndef P6I18N_H__
19 #define P6I18N_H__ 1
20 
21 #include "p6err.h"
22 #include "p6comdef.h"
23 #include "p6filetypes.h"
24 
25 namespace P6R {
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
36 typedef enum
37 {
38  NOOP = 0x00,
39  READ = 0x01,
40  WRITE = 0x02,
41  READWRITE = 0x03,
42  APPEND = 0x04
43 } P6OPEN_MODE;
44 
45 
54 const P6I18NFLAGS P6I18N_NOFLAGS = 0x00000000;
55 
56 
66 interface p6II18nFile : public p6ICom
67 {
84  P6COMMETHOD initialize( P6I18NFLAGS flags, const P6CHAR* pLocale ) = 0;
85 
101  P6COMMETHOD fopen( const P6WCHAR* pFilePath, P6FILEFLAGS operation, P6FILEMODE mode ) = 0;
102 
112  P6COMMETHOD fclose() = 0;
113 
143  P6COMMETHOD fileFormatString( P6UINT32* pcWritten, const P6WCHAR* pszFormat, const P6ARG* pArgs, P6INT32 cArgs ) = 0;
144 
157  P6COMMETHOD fgetwc( P6WCHAR* pWc ) = 0;
158 
172  P6COMMETHOD fgetws( P6WCHAR* pDst, P6UINT32 dstSize ) = 0;
173 
184  P6COMMETHOD fputwc( P6WCHAR wc ) = 0;
185 
198  P6COMMETHOD fputws( P6WCHAR* pWs ) = 0;
199 
212  P6COMMETHOD fwide( P6INT32 mode, P6INT32* result ) = 0;
213 
227  P6COMMETHOD fgetUTF8( P6CHAR* pDst, P6UINT32 dstSize ) = 0;
228 
240  P6COMMETHOD fputUTF8( P6CHAR* pUtf8 ) = 0;
241 };
242 
243  // {16CBE73E-8593-4fa4-BB8C-AD4B00A4654F}
244 #define IF_p6II18nFile {0x16cbe73e,0x8593,0x4fa4,{0xbb,0x8c,0xad,0x4b,0x0,0xa4,0x65,0x4f}}
245 
246 // {424D9BB3-33E6-41ee-BE1D-B1343DFDC651}
247 #define COMP_p6I18nFile {0x424d9bb3,0x33e6,0x41ee,{0xbe,0x1d,0xb1,0x34,0x3d,0xfd,0xc6,0x51}}
248 
249 
250 
259 interface p6II18n : public p6ICom
260 {
276  P6COMMETHOD initialize( P6I18NFLAGS flags, const P6CHAR* pLocale ) = 0;
277 
294  P6COMMETHOD setLocale( const P6CHAR* pLocale ) = 0;
295 
307  P6COMMETHOD getLocaleInUse( const P6CHAR*& pLocale ) = 0;
308 
322  P6COMMETHOD setCollation( const P6CHAR* pCollationName ) = 0;
323 
336  P6COMMETHOD getCollationInUse( const P6CHAR*& pCollationName ) = 0;
337 
338 
339  // [A] Conversion Methods
352  P6COMMETHOD btowc( P6INT32 sc, P6WCHAR* pWc ) = 0;
353 
366  P6COMMETHOD wctob( P6WCHAR wc, P6INT32* pSc ) = 0;
367 
389  P6COMMETHOD wcstod( const P6WCHAR* pSrc, P6WCHAR** pEndPtr, P6FLOAT* pToDouble ) = 0;
390 
422  P6COMMETHOD wcstol( const P6WCHAR* pSrc, P6WCHAR** pEndptr, P6INT32 base, P6INT32* pResult ) = 0;
423 
424  // -> convert a wide-character string to an unsigned long
444  P6COMMETHOD wcstoul( const P6WCHAR* pSrc, P6WCHAR** pEndptr, P6INT32 base, P6UINT32* pResult ) = 0;
445 
478  P6COMMETHOD wcstoll( const P6WCHAR* pSrc, P6WCHAR** pEndptr, P6INT32 base, P6INT64* pResult ) = 0;
479 
512  P6COMMETHOD wcstoull( const P6WCHAR* pSrc, P6WCHAR** pEndptr, P6INT32 base, P6UINT64* pResult ) = 0;
513 
530  P6COMMETHOD mbsinit( const mbstate_t* pMbs, P6INT32* pResult ) = 0;
531 
557  P6COMMETHOD mbrtowc( P6WCHAR* pDst, const P6CHAR* pSrc, P6UINT32 n, mbstate_t* pMbs, P6UINT32* pResultSize ) = 0;
558 
580  P6COMMETHOD mbsrtowcs( P6WCHAR* pDst, P6UINT32 dstSize, const P6CHAR** pSrc, mbstate_t* pMbs, P6UINT32* pResultSize ) = 0;
581 
599  P6COMMETHOD wcrtomb( P6CHAR* pDst, P6WCHAR pSrc, mbstate_t* pMbs, P6UINT32* pResultSize ) = 0;
600 
621  P6COMMETHOD wcsrtombs( P6CHAR* pDst, P6UINT32 dstSize, const P6WCHAR** pSrc, mbstate_t* pMbs, P6UINT32* pResultSize ) = 0;
622 
641  P6COMMETHOD wcsxfrm( P6WCHAR* pDst, const P6WCHAR* pSrc, P6R::P6UINT32 n, P6UINT32* pResultSize ) = 0;
642 
660  P6COMMETHOD utf8ToWc( P6WCHAR* pDst, P6UINT32* pDstSize, const P6CHAR* pSrc, P6UINT32 srcSize ) = 0;
661 
682  P6COMMETHOD utf8ToWcs( P6WCHAR* pDst, P6UINT32* pDstSize, const P6CHAR* pSrc ) = 0;
683 
707  P6COMMETHOD utf8NToWcs( P6WCHAR* pDst, P6UINT32* pDstSize, const P6CHAR* pSrc, P6UINT32 cCount ) = 0;
708 
730  P6COMMETHOD wcToUtf8( P6CHAR* pDst, P6UINT32* pDstSize, P6WCHAR wc ) = 0;
731 
752  P6COMMETHOD wcsToUtf8( P6CHAR* pDst, P6UINT32* pDstSize, const P6WCHAR* pWs ) = 0;
753 
775  P6COMMETHOD wcsNToUtf8( P6CHAR* pDst, P6UINT32* pDstSize, const P6WCHAR* pWs, P6UINT32 cCount ) = 0;
776 
777 
778 
779  // [B] Query Properties Methods
792  P6COMMETHOD iswalnum( P6WCHAR wc, P6BOOL* pResult ) = 0;
793 
806  P6COMMETHOD iswalpha( P6WCHAR wc, P6BOOL* pResult ) = 0;
807 
820  P6COMMETHOD iswcntrl( P6WCHAR wc, P6BOOL* pResult ) = 0;
821 
834  P6COMMETHOD iswdigit( P6WCHAR wc, P6BOOL* pResult ) = 0;
835 
848  P6COMMETHOD iswgraph( P6WCHAR wc, P6BOOL* pResult ) = 0;
849 
862  P6COMMETHOD iswlower( P6WCHAR wc, P6BOOL* pResult ) = 0;
863 
876  P6COMMETHOD iswprint( P6WCHAR wc, P6BOOL* pResult ) = 0;
877 
890  P6COMMETHOD iswpunct( P6WCHAR wc, P6BOOL* pResult ) = 0;
891 
904  P6COMMETHOD iswspace( P6WCHAR wc, P6BOOL* pResult ) = 0;
905 
918  P6COMMETHOD iswupper( P6WCHAR wc, P6BOOL* pResult ) = 0;
919 
932  P6COMMETHOD iswxdigit( P6WCHAR wc, P6BOOL* pResult ) = 0;
933 
952  P6COMMETHOD iswctype( P6WCHAR wc, P6UINT16 charClass, P6BOOL* pResult ) = 0;
953 
966  P6COMMETHOD iswLineTerminator( P6WCHAR wc, P6BOOL* pResult ) = 0;
967 
994  P6COMMETHOD mbrlen( const P6CHAR* pSrc, P6UINT32 srcSize, mbstate_t* pMbs, P6UINT32* pResultSize ) = 0;
995 
1012  P6COMMETHOD wcscspn( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32* pResultSize ) = 0;
1013 
1029  P6COMMETHOD wcsspn( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32* pResultSize ) = 0;
1030 
1043  P6COMMETHOD wcslen( const P6WCHAR* pWs, P6UINT32* pResultSize ) = 0;
1044 
1045 
1046 
1047  // [C] String (character) Search Methods
1062  P6COMMETHOD wcsstr( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6WCHAR** pResult ) = 0;
1063 
1079  P6COMMETHOD wcspbrk( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6WCHAR** pResult ) = 0;
1080 
1095  P6COMMETHOD wcschr( const P6WCHAR* pWs, P6WCHAR wc, P6WCHAR** pResult ) = 0;
1096 
1111  P6COMMETHOD wcsrchr( const P6WCHAR* pWs, P6WCHAR wc, P6WCHAR** pResult ) = 0;
1112 
1128  P6COMMETHOD wmemchr( const P6WCHAR* pWs, P6WCHAR wc, P6UINT32 n, P6WCHAR** pResult ) = 0;
1129 
1130 
1131 
1132  // [D] String (character) Construction (Manipualation) Methods
1164  P6COMMETHOD formatString( P6WCHAR* pDst, P6SIZE cDst, P6SIZE *pcWritten, const P6WCHAR* pszFormat, const P6ARG* pArgs, P6INT32 cArgs ) = 0;
1165 
1179  P6COMMETHOD towlower( P6WCHAR wc, P6WCHAR* pLowerWc ) = 0;
1180 
1194  P6COMMETHOD towupper( P6WCHAR wc, P6WCHAR* pUpperWc ) = 0;
1195 
1207  P6COMMETHOD wcslwr( P6WCHAR* pWs ) = 0;
1208 
1220  P6COMMETHOD wcsupr( P6WCHAR* pWs ) = 0;
1221 
1235  P6COMMETHOD wcsncat( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n ) = 0;
1236 
1250  P6COMMETHOD wcsncpy( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n ) = 0;
1251 
1269  P6COMMETHOD wcslcpy( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 size ) = 0;
1270 
1288  P6COMMETHOD wcslcat( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 size ) = 0;
1289 
1304  P6COMMETHOD wmemcpy( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n ) = 0;
1305 
1323  P6COMMETHOD wmemmove( P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n ) = 0;
1324 
1339  P6COMMETHOD wmemset( P6WCHAR* pWs, P6WCHAR wc, P6UINT32 n ) = 0;
1340 
1356  P6COMMETHOD wcsdup( P6WCHAR*& pWs1, const P6WCHAR* pWs2 ) = 0;
1357 
1369  P6COMMETHOD wcsdupFree( P6WCHAR* pWs ) = 0;
1370 
1384  P6COMMETHOD wcsStrToCntrl( P6WCHAR* pWs ) = 0;
1385 
1405  P6COMMETHOD wcsCntrlToStr( const P6WCHAR* pWs, P6WCHAR* pDst, P6UINT32* pDstSize ) = 0;
1406 
1407  // -> format time strings in a wide and local manner
1408  // -> P6R extension that supports "%k" which expands to display milliseconds
1432  P6COMMETHOD wcsftime( P6WCHAR* pDst, P6UINT32* pDstSize, const P6WCHAR* pFormat, P6TIME tod, P6BOOL inGMT ) = 0;
1433 
1434 
1435 
1436  // [E] String Comparison Methods
1452  P6COMMETHOD wcscmp( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6INT32* pResult ) = 0;
1453 
1471  P6COMMETHOD wcsncmp( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6R::P6UINT32 n, P6INT32* pResult ) = 0;
1472 
1489  P6COMMETHOD wcsicmp( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6INT32* pResult ) = 0;
1490 
1508  P6COMMETHOD wcsnicmp( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n, P6INT32* pResult ) = 0;
1509 
1527  P6COMMETHOD wcscoll( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6INT32* pResult ) = 0;
1528 
1546  P6COMMETHOD wmemcmp( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6UINT32 n, P6INT32* pResult ) = 0;
1547 
1563  P6COMMETHOD startsWith( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6R::P6BOOL* pResult ) = 0;
1564 
1579  P6COMMETHOD endsWith( const P6WCHAR* pWs1, const P6WCHAR* pWs2, P6BOOL* pResult ) = 0;
1580 
1581 
1582 
1583  // [F] String Parsing Methods
1606  P6COMMETHOD wcstok( P6WCHAR* pWs, const P6WCHAR* pDelimit, P6WCHAR** pResult ) = 0;
1607 
1608 
1609  // [G] Misc
1626  P6COMMETHOD wctype( const P6CHAR* property, P6UINT16* pCharClass ) = 0;
1627 
1640  P6COMMETHOD trimEnd( P6WCHAR* pWs ) = 0;
1641 };
1642 
1643 // {AA13B086-7425-4ec4-9C35-40DA83A6CAEC}
1644 #define IF_p6II18n {0xaa13b086,0x7425,0x4ec4,{0x9c,0x35,0x40,0xda,0x83,0xa6,0xca,0xec}}
1645 
1646 // {4D41A2BA-761D-4d05-A4BC-CD376BBCA93D}
1647 #define COMP_p6I18n {0x4d41a2ba,0x761d,0x4d05,{0xa4,0xbc,0xcd,0x37,0x6b,0xbc,0xa9,0x3d}}
1648 
1649 #ifdef __cplusplus
1650 }
1651 #endif
1652 
1653 } // namespace
1654 
1655 
1656 #endif
1657 
1658 
1659 
virtual P6R::P6ERR wcsToUtf8(P6CHAR *pDst, P6UINT32 *pDstSize, const P6WCHAR *pWs)=0
Locale independent conversion from wide character string to UTF8 multibyte character string...
size_t P6SIZE
Definition: p6types.h:62
virtual P6R::P6ERR initialize(P6I18NFLAGS flags, const P6CHAR *pLocale)=0
Sets up the object to run properly.
P6LONGLONG P6INT64
Definition: p6types.h:50
virtual P6R::P6ERR wcslen(const P6WCHAR *pWs, P6UINT32 *pResultSize)=0
Get wide-character string length.
virtual P6R::P6ERR wcsnicmp(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n, P6INT32 *pResult)=0
Case-insensitive Compare two wide-character strings upto n characters Returns an integer greater than...
virtual P6R::P6ERR mbrlen(const P6CHAR *pSrc, P6UINT32 srcSize, mbstate_t *pMbs, P6UINT32 *pResultSize)=0
Get number of bytes in a (possibly multi-byte) character.
virtual P6R::P6ERR fclose()=0
When done with a file close frees allocated memory for the file and flushes data to disk...
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR mbsrtowcs(P6WCHAR *pDst, P6UINT32 dstSize, const P6CHAR **pSrc, mbstate_t *pMbs, P6UINT32 *pResultSize)=0
Convert a character string to a wide-character string (restartable)
virtual P6R::P6ERR setCollation(const P6CHAR *pCollationName)=0
Allows the caller to change the collation of the active locale.
virtual P6R::P6ERR trimEnd(P6WCHAR *pWs)=0
Trim off trailing white space off the end of a string (i.e., { space, tab, newline, carriage return } ).
virtual P6R::P6ERR wcsNToUtf8(P6CHAR *pDst, P6UINT32 *pDstSize, const P6WCHAR *pWs, P6UINT32 cCount)=0
Locale independent conversion from wide character string to UTF8 multibyte character string...
virtual P6R::P6ERR wcsftime(P6WCHAR *pDst, P6UINT32 *pDstSize, const P6WCHAR *pFormat, P6TIME tod, P6BOOL inGMT)=0
L10N support: format time strings in a wide character local manner.
virtual P6R::P6ERR wcsncpy(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n)=0
Copy part of a wide-character string.
Standard error codes.
virtual P6R::P6ERR wmemset(P6WCHAR *pWs, P6WCHAR wc, P6UINT32 n)=0
Set wide-characters in memory (not affected by locale) Set n characters in the string pointed to by p...
virtual P6R::P6ERR mbsinit(const mbstate_t *pMbs, P6INT32 *pResult)=0
Tracks the state of a multibyte character conversion.
virtual P6R::P6ERR wcToUtf8(P6CHAR *pDst, P6UINT32 *pDstSize, P6WCHAR wc)=0
Locale independent conversion from a single wide character to a UTF8 multibyte string.
bool P6BOOL
Boolean type.
Definition: p6types.h:101
virtual P6R::P6ERR wcscmp(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6INT32 *pResult)=0
Compare two wide-character strings Returns an integer greater than, equal to or less than 0...
virtual P6R::P6ERR formatString(P6WCHAR *pDst, P6SIZE cDst, P6SIZE *pcWritten, const P6WCHAR *pszFormat, const P6ARG *pArgs, P6INT32 cArgs)=0
Print formatted wide-character output into a buffer.
virtual P6R::P6ERR iswalnum(P6WCHAR wc, P6BOOL *pResult)=0
Test for an alphanumeric wide-character code.
virtual P6R::P6ERR wcsStrToCntrl(P6WCHAR *pWs)=0
Convert control character sequences (i.e., '\n', '\t', '\r') to their single character value (i...
virtual P6R::P6ERR fileFormatString(P6UINT32 *pcWritten, const P6WCHAR *pszFormat, const P6ARG *pArgs, P6INT32 cArgs)=0
Print formatted wide-character output to the file opened in fopen.
virtual P6R::P6ERR utf8NToWcs(P6WCHAR *pDst, P6UINT32 *pDstSize, const P6CHAR *pSrc, P6UINT32 cCount)=0
Locale independent conversion from a UTF8 multibyte string to wide character string.
virtual P6R::P6ERR iswxdigit(P6WCHAR wc, P6BOOL *pResult)=0
Test for a hexadecimal digit wide-character code.
virtual P6R::P6ERR wcsrchr(const P6WCHAR *pWs, P6WCHAR wc, P6WCHAR **pResult)=0
Find the last occurance of a wide character in a string Return the location of the last occurance of ...
virtual P6R::P6ERR initialize(P6I18NFLAGS flags, const P6CHAR *pLocale)=0
Sets up the object to run properly.
virtual P6R::P6ERR iswdigit(P6WCHAR wc, P6BOOL *pResult)=0
Test for a decimal digit wide-character code.
virtual P6R::P6ERR iswalpha(P6WCHAR wc, P6BOOL *pResult)=0
Test for an alphabetic wide-character code.
virtual P6R::P6ERR wcstoll(const P6WCHAR *pSrc, P6WCHAR **pEndptr, P6INT32 base, P6INT64 *pResult)=0
Convert a wide-character string to a 64 bit signed integer value.
virtual P6R::P6ERR wcspbrk(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6WCHAR **pResult)=0
Scan string for a wide-character code Find the first location in the string pointed to by pWs1 of any...
const P6I18NFLAGS P6I18N_NOFLAGS
Definition: p6i18n.h:54
virtual P6R::P6ERR wmemcmp(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n, P6INT32 *pResult)=0
Compare two wide-character strings upto n characters (not affected by locale) Returns an integer grea...
virtual P6R::P6ERR wcsncat(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n)=0
Concatenate part of two wide-character strings.
virtual P6R::P6ERR fgetUTF8(P6CHAR *pDst, P6UINT32 dstSize)=0
Read a UTF8 encoded string from the openned file, reads until hits EOF or until dst is full...
virtual P6R::P6ERR wcstok(P6WCHAR *pWs, const P6WCHAR *pDelimit, P6WCHAR **pResult)=0
Split wide-character string into tokens.
virtual P6R::P6ERR wcsxfrm(P6WCHAR *pDst, const P6WCHAR *pSrc, P6R::P6UINT32 n, P6UINT32 *pResultSize)=0
Wide-character string transformation.
virtual P6R::P6ERR wcslcpy(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 size)=0
Safe copy of a wide-character string Copy as many characters as possible from pWs2 to the start of th...
Main internationalization (p6I18n) and localization (L10N) interface.
Definition: p6i18n.h:259
virtual P6R::P6ERR fputUTF8(P6CHAR *pUtf8)=0
Write an UTF8 string to the openned file.
virtual P6R::P6ERR wcsupr(P6WCHAR *pWs)=0
Convert lower-case wide-character string to upper-case string.
virtual P6R::P6ERR getLocaleInUse(const P6CHAR *&pLocale)=0
Returns the short version of the locale (i.e., the language tag "fr_fr") that is in use...
File and directory type definitions.
virtual P6R::P6ERR iswpunct(P6WCHAR wc, P6BOOL *pResult)=0
Test for a punctuation wide-character code.
virtual P6R::P6ERR iswLineTerminator(P6WCHAR wc, P6BOOL *pResult)=0
Is the input character a line terminator (e.g., ASCII line feed U+000A)
unsigned short int P6UINT16
Definition: p6types.h:34
virtual P6R::P6ERR wcsicmp(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6INT32 *pResult)=0
Case-insensitive Compare two wide-character strings Returns an integer greater than, equal to or less than 0, if the wide-character string pointed to by pWs1 is greater than, equal to or less than the wide-character string pointed to by pWs2.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
virtual P6R::P6ERR wcstod(const P6WCHAR *pSrc, P6WCHAR **pEndPtr, P6FLOAT *pToDouble)=0
Convert a wide-character string to a double-precision number.
virtual P6R::P6ERR wcstoul(const P6WCHAR *pSrc, P6WCHAR **pEndptr, P6INT32 base, P6UINT32 *pResult)=0
Convert a wide-character string to a unsigned long.
virtual P6R::P6ERR wctob(P6WCHAR wc, P6INT32 *pSc)=0
Wide-character to single-byte conversion.
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR startsWith(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6R::P6BOOL *pResult)=0
Does string one start with string two Does the wide-character string pointed to by pWs1 start with th...
P6UINT32 P6I18NFLAGS
P6I18NFLAGS.
Definition: p6i18n.h:53
virtual P6R::P6ERR towlower(P6WCHAR wc, P6WCHAR *pLowerWc)=0
Convert upper-case wide-character code to lower-case If there are no upper-case version of the wc par...
virtual P6R::P6ERR endsWith(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6BOOL *pResult)=0
Does string one end with string two? Does the wide-character string pointed to by pWs1 end with the s...
P6COM base interface definitions.
P6OPEN_MODE
file open modes, no combinations are currently supported
Definition: p6i18n.h:36
virtual P6R::P6ERR utf8ToWc(P6WCHAR *pDst, P6UINT32 *pDstSize, const P6CHAR *pSrc, P6UINT32 srcSize)=0
Locale independent conversion from utf8 multibyte respresentation to a single wide character...
virtual P6R::P6ERR wcslcat(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 size)=0
Safe concatenate of two wide-character strings Append as many characters as possible from pWs2 to the...
virtual P6R::P6ERR getCollationInUse(const P6CHAR *&pCollationName)=0
Returns the collation string of the active locale.
virtual P6R::P6ERR setLocale(const P6CHAR *pLocale)=0
Allows the caller to change the currently active locale.
virtual P6R::P6ERR wcsstr(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6WCHAR **pResult)=0
Find a wide-character substring Finds the first occurrence of the string pointed to by pWs2 contained...
virtual P6R::P6ERR wcstoull(const P6WCHAR *pSrc, P6WCHAR **pEndptr, P6INT32 base, P6UINT64 *pResult)=0
Convert a wide-character string to a 64 bit unsigned integer value.
virtual P6R::P6ERR wcsdupFree(P6WCHAR *pWs)=0
Free the duplicate wide-character string created by a call to wcsdup.
virtual P6R::P6ERR btowc(P6INT32 sc, P6WCHAR *pWc)=0
Single-byte to wide-character conversion.
P6ULONGLONG P6UINT64
Definition: p6types.h:49
virtual P6R::P6ERR wmemcpy(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n)=0
Copy part of a wide-character string (not affected by locale) Copy n characters from pWs2 to the star...
virtual P6R::P6ERR utf8ToWcs(P6WCHAR *pDst, P6UINT32 *pDstSize, const P6CHAR *pSrc)=0
Locale independent conversion from a UTF8 multibyte string to wide character string.
virtual P6R::P6ERR wcsdup(P6WCHAR *&pWs1, const P6WCHAR *pWs2)=0
Duplicate a wide-character string Make a copy of the string pointed to by pWs2 and store a pointer to...
virtual P6R::P6ERR fputwc(P6WCHAR wc)=0
Write the a wide character to the openned file.
virtual P6R::P6ERR iswprint(P6WCHAR wc, P6BOOL *pResult)=0
Test for a printing wide-character code.
virtual P6R::P6ERR wcscoll(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6INT32 *pResult)=0
Wide-character string comparison using collating information Returns an integer greater than...
virtual P6R::P6ERR wcscspn(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 *pResultSize)=0
Get length of a complementary wide substring.
p6I18n file IO support.
Definition: p6i18n.h:66
virtual P6R::P6ERR fgetwc(P6WCHAR *pWc)=0
Read the next wide character from the openned file.
virtual P6R::P6ERR iswgraph(P6WCHAR wc, P6BOOL *pResult)=0
Test for a visible wide-character code.
virtual P6R::P6ERR fopen(const P6WCHAR *pFilePath, P6FILEFLAGS operation, P6FILEMODE mode)=0
To any of the p6I18n file IO functions requires that this fopen function be used. ...
virtual P6R::P6ERR wcrtomb(P6CHAR *pDst, P6WCHAR pSrc, mbstate_t *pMbs, P6UINT32 *pResultSize)=0
Convert a wide-character code to a (multibyte) character (restartable)
virtual P6R::P6ERR wmemchr(const P6WCHAR *pWs, P6WCHAR wc, P6UINT32 n, P6WCHAR **pResult)=0
Find a wide-character in memory (not affected by locale) Find the location of the first occurrence of...
virtual P6R::P6ERR wcsncmp(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6R::P6UINT32 n, P6INT32 *pResult)=0
Compare two wide-character strings upto n characters Returns an integer greater than, equal to or less than 0, if the wide-character string pointed to by pWs1 is greater than, equal to or less than the wide-character string pointed to by pWs2.
virtual P6R::P6ERR mbrtowc(P6WCHAR *pDst, const P6CHAR *pSrc, P6UINT32 n, mbstate_t *pMbs, P6UINT32 *pResultSize)=0
Convert a character to a wide character (restartable)
P6R::P6UINT32 P6FILEFLAGS
File access flags are passed to various file open/create calls to specify the type of access that is ...
Definition: p6filetypes.h:40
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR wcsspn(const P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 *pResultSize)=0
Get length of a wide substring.
virtual P6R::P6ERR towupper(P6WCHAR wc, P6WCHAR *pUpperWc)=0
Convert lower-case wide-character code to upper-case If there are no lower-case version of the wc par...
virtual P6R::P6ERR iswctype(P6WCHAR wc, P6UINT16 charClass, P6BOOL *pResult)=0
Test character for a specified class.
P6UINT32 P6FILEMODE
Definition: p6filetypes.h:74
virtual P6R::P6ERR wcsrtombs(P6CHAR *pDst, P6UINT32 dstSize, const P6WCHAR **pSrc, mbstate_t *pMbs, P6UINT32 *pResultSize)=0
Convert a wide-character string to a character string (restartable)
P6INT64 P6TIME
The wallclock time represented as the number of microseconds since midnight January 1 1970 UTC...
Definition: p6types.h:228
virtual P6R::P6ERR wcstol(const P6WCHAR *pSrc, P6WCHAR **pEndptr, P6INT32 base, P6INT32 *pResult)=0
Convert a wide-character string to a long integer.
virtual P6R::P6ERR wmemmove(P6WCHAR *pWs1, const P6WCHAR *pWs2, P6UINT32 n)=0
Copy wide-characters in memory with overlapping areas (not affected by locale) Copies n characters fr...
double P6FLOAT
Definition: p6types.h:63
virtual P6R::P6ERR iswlower(P6WCHAR wc, P6BOOL *pResult)=0
Test for a lower-case letter wide-character code.
virtual P6R::P6ERR fgetws(P6WCHAR *pDst, P6UINT32 dstSize)=0
Read a wide-character string from the openned file, reads until hits a new line or EOF or until pDst ...
virtual P6R::P6ERR wcschr(const P6WCHAR *pWs, P6WCHAR wc, P6WCHAR **pResult)=0
Find the first occurance of a wide character in a string Return the location of wc in the string poin...
virtual P6R::P6ERR wctype(const P6CHAR *property, P6UINT16 *pCharClass)=0
Define character class.
virtual P6R::P6ERR iswspace(P6WCHAR wc, P6BOOL *pResult)=0
Test for a white-space wide-character code.
virtual P6R::P6ERR wcsCntrlToStr(const P6WCHAR *pWs, P6WCHAR *pDst, P6UINT32 *pDstSize)=0
Convert control character codes (i.e., 0x000A, 0x0009, 0x000D) into their character string representa...
virtual P6R::P6ERR wcslwr(P6WCHAR *pWs)=0
Convert upper-case wide-character string to lower-case string.
virtual P6R::P6ERR iswupper(P6WCHAR wc, P6BOOL *pResult)=0
Test for an upper-case wide-character code.
virtual P6R::P6ERR iswcntrl(P6WCHAR wc, P6BOOL *pResult)=0
Test for a control wide-character code.
virtual P6R::P6ERR fwide(P6INT32 mode, P6INT32 *result)=0
Set the open file's orientation (i.e., wide or narrow).
Argument definition.
Definition: p6types.h:504
virtual P6R::P6ERR fputws(P6WCHAR *pWs)=0
Write a wide-character string to the openned file.
char P6CHAR
Narrow character type.
Definition: p6types.h:71