Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

xmog_java_string.h

00001 /*
00002  * Copyright 1999-2006 by Codemesh, Inc.  ALL RIGHTS RESERVED.
00003  */
00004 
00005 #ifndef xmog_java_string_inc
00006 #define xmog_java_string_inc
00007 
00009 
00010 struct xmog_base;
00011 class xmog_localenv;
00012 
00014 
00015 
00016 #include "xmog.h"
00017 
00227 
00237 class XMOG_DECLSPEC xmog_java_string
00238 {
00239 public:
00240 
00244     static xmog_base *  US_ASCII;
00245 
00249     static xmog_base *  ISO_8859_1;
00250 
00254     static xmog_base *  UTF_8;
00255 
00259     static xmog_base *  UTF_16BE;
00260 
00264     static xmog_base *  UTF_16LE;
00265 
00269     static xmog_base *  UTF_16;
00270 
00277     static void         init_encodings( xmog_localenv * env = NULL );
00278 
00288     static void         set_default_encoding( const char * _enc, xmog_localenv * env = NULL );
00289 
00299     static void         set_default_encoding( const XMOG_WCHAR * _enc, xmog_localenv * env = NULL );
00300 
00310     static void         set_default_encoding( xmog_base * _enc, xmog_localenv * env = NULL );
00311 
00312 #if (XMOG_SUPPORTS_WCHAR_T==1)
00323     static jstring      from_wchar( const XMOG_WCHAR * _wstr, jint _len = -1, xmog_localenv * env = NULL );
00324 #endif
00325 
00326 #   if (XMOG_REQUIRES_UNSIGNED_SHORT_OVERLOAD==1)
00337     static jstring      from_wchar( const unsigned short * _wstr, jint _len = -1, xmog_localenv * env = NULL );
00338 #   endif
00339 
00340 #   if (XMOG_SUPPORTS_WCHAR_T==1)
00353     static void         from_wchar( xmog_base * _this, xmog_flags _flags, const XMOG_WCHAR * _wstr, jint _len = -1, xmog_localenv * env = NULL );
00354 #   endif
00355 
00356 #   if (XMOG_REQUIRES_UNSIGNED_SHORT_OVERLOAD==1)
00369     static void         from_wchar( xmog_base * _this, xmog_flags _flags, const unsigned short * _wstr, jint _len = -1, xmog_localenv * env = NULL );
00370 #   endif
00371 
00385     static jstring      from_char( const char * _str, jint _len = -1, xmog_base * _enc = NULL, xmog_localenv * env = NULL, xmog_base * pStr = NULL, char** pCache = NULL );
00386 
00402     static void         from_char( xmog_base * _this, xmog_flags _flags, const char * _str, jint _len = -1, xmog_base * _enc = NULL, xmog_localenv * env = NULL, xmog_base * pStr = NULL, char** pCache = NULL );
00403 
00411     static jstring      from_charUtf8( const char * _strUTF, xmog_localenv * env = NULL );
00412 
00422     static void         from_charUtf8( xmog_base * _this, xmog_flags _flags, const char * _strUTF, xmog_localenv * env = NULL );
00423 
00434     static char *       to_char( jstring _str, xmog_localenv * env = NULL, xmog_base * pStr = NULL, char** pCache = NULL );
00435 
00447     static char *       to_char( jstring _str, xmog_base * _enc = NULL, xmog_localenv * env = NULL, xmog_base * pStr = NULL, char** pCache = NULL );
00448 
00459     static char *       to_charUtf8( jstring _str, xmog_localenv * env = NULL, xmog_base * pStr = NULL, char** pCache = NULL );
00460 
00461 #   if (XMOG_SUPPORTS_WCHAR_T==1)
00470     static XMOG_WCHAR * to_wchar( jstring _str, xmog_localenv * env = NULL );
00471 #   endif
00472 
00481     static unsigned short * to_u16( jstring _str, xmog_localenv * env = NULL );
00482 
00491     static void         free( char * & str );
00492 
00493 #   if (XMOG_SUPPORTS_WCHAR_T==1)
00502     static void         free( XMOG_WCHAR * & str );
00503 #   endif
00504 
00505 #   if (XMOG_REQUIRES_UNSIGNED_SHORT_OVERLOAD==1)
00514     static void         free( unsigned short * & str );
00515 #   endif
00516 
00525     static void         free_u16( unsigned short * & str );
00526 };
00527 
00528 
00529 #if (XMOG_PRE_3_0_SUPPORT == 1 )
00530 
00531 class cmjstr
00532 {
00533 private:
00534 
00535     char *      pch;
00536 
00537 public:
00538 
00539 };
00540 
00541 #endif /* XMOG_PRE_3_0_SUPPORT */
00542 
00543 #endif /* xmog_java_string_inc */

Generated on Wed May 31 14:01:19 2006 for Shared Codemesh Runtime Library API Reference by  doxygen 1.4.1