Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ucnv_cnv.h File Reference

Go to the source code of this file.

Compounds

struct  UConverterDBCSTable
struct  UConverterImpl
struct  UConverterSBCSTable
union  UConverterTable

Typedefs

typedef void (* UConverterLoad )(UConverterSharedData *sharedData, const uint8_t *raw, UErrorCode *pErrorCode)
typedef void (* UConverterUnload )(UConverterSharedData *sharedData)
typedef void (* UConverterOpen )(UConverter *cnv, const char *name, const char *locale,uint32_t options, UErrorCode *pErrorCode)
typedef void (* UConverterClose )(UConverter *cnv)
typedef void (* UConverterReset )(UConverter *cnv)
typedef void (* T_ToUnicodeFunction )(UConverterToUnicodeArgs *, UErrorCode *)
typedef void (* T_FromUnicodeFunction )(UConverterFromUnicodeArgs *, UErrorCode *)
typedef UChar32 (* T_GetNextUCharFunction )(UConverterToUnicodeArgs *, UErrorCode *)
typedef void (* UConverterGetStarters )(const UConverter* converter, UBool starters[256], UErrorCode *pErrorCode)
typedef const char* (* UConverterGetName )(const UConverter *cnv)

Functions

UBool CONVERSION_U_SUCCESS (UErrorCode err)
void flushInternalUnicodeBuffer (UConverter * _this, UChar * myTarget, int32_t * myTargetIndex, int32_t targetLength, int32_t** offsets, UErrorCode * err)
void flushInternalCharBuffer (UConverter * _this, char *myTarget, int32_t * myTargetIndex, int32_t targetLength, int32_t** offsets, UErrorCode * err)
U_CDECL_END U_CFUNC UChar32 ucnv_getUChar32KeepOverflow (UConverter *cnv, const UChar *buffer, int32_t length)
 This function is useful for implementations of getNextUChar(). More...

U_CFUNC int32_tucnv_updateCallbackOffsets (int32_t *offsets, int32_t length, int32_t sourceIndex)
 This helper function updates the offsets array after a callback function call. More...


Variables

const UConverterSharedData _SBCSData
const UConverterSharedData _DBCSData
const UConverterSharedData _MBCSData
const UConverterSharedData _Latin1Data
const UConverterSharedData _UTF8Data
const UConverterSharedData _UTF16BEData
const UConverterSharedData _UTF16LEData
const UConverterSharedData _UTF32BEData
const UConverterSharedData _UTF32LEData
const UConverterSharedData _EBCDICStatefulData
const UConverterSharedData _ISO2022Data
const UConverterSharedData _LMBCSData1
const UConverterSharedData _LMBCSData2
const UConverterSharedData _LMBCSData3
const UConverterSharedData _LMBCSData4
const UConverterSharedData _LMBCSData5
const UConverterSharedData _LMBCSData6
const UConverterSharedData _LMBCSData8
const UConverterSharedData _LMBCSData11
const UConverterSharedData _LMBCSData16
const UConverterSharedData _LMBCSData17
const UConverterSharedData _LMBCSData18
const UConverterSharedData _LMBCSData19
const UConverterSharedData _HZData


Typedef Documentation

typedef void (* T_FromUnicodeFunction)(UConverterFromUnicodeArgs *, UErrorCode *)
 

Definition at line 147 of file ucnv_cnv.h.

typedef UChar32 (* T_GetNextUCharFunction)(UConverterToUnicodeArgs *, UErrorCode *)
 

Definition at line 149 of file ucnv_cnv.h.

typedef void (* T_ToUnicodeFunction)(UConverterToUnicodeArgs *, UErrorCode *)
 

Definition at line 145 of file ucnv_cnv.h.

typedef void (* UConverterClose)(UConverter *cnv)
 

Definition at line 141 of file ucnv_cnv.h.

typedef const char* (* UConverterGetName)(const UConverter *cnv)
 

Definition at line 158 of file ucnv_cnv.h.

typedef void (* UConverterGetStarters)(const UConverter* converter, UBool starters[256], UErrorCode *pErrorCode)
 

Definition at line 151 of file ucnv_cnv.h.

typedef void (* UConverterLoad)(UConverterSharedData *sharedData, const uint8_t *raw, UErrorCode *pErrorCode)
 

Definition at line 137 of file ucnv_cnv.h.

typedef void (* UConverterOpen)(UConverter *cnv, const char *name, const char *locale,uint32_t options, UErrorCode *pErrorCode)
 

Definition at line 140 of file ucnv_cnv.h.

typedef void (* UConverterReset)(UConverter *cnv)
 

Definition at line 143 of file ucnv_cnv.h.

typedef void (* UConverterUnload)(UConverterSharedData *sharedData)
 

Definition at line 138 of file ucnv_cnv.h.


Function Documentation

UBool CONVERSION_U_SUCCESS ( UErrorCode err )
 

void flushInternalCharBuffer ( UConverter * _this,
char * myTarget,
int32_t * myTargetIndex,
int32_t targetLength,
int32_t ** offsets,
UErrorCode * err )
 

void flushInternalUnicodeBuffer ( UConverter * _this,
UChar * myTarget,
int32_t * myTargetIndex,
int32_t targetLength,
int32_t ** offsets,
UErrorCode * err )
 

U_CDECL_END U_CFUNC UChar32 ucnv_getUChar32KeepOverflow ( UConverter * cnv,
const UChar * buffer,
int32_t length )
 

This function is useful for implementations of getNextUChar().

After a call to a callback function or to toUnicode(), an output buffer begins with a Unicode code point that needs to be returned as UChar32, and all following code units must be prepended to the - potentially prefilled - overflow buffer in the UConverter. The buffer should be at least of capacity UTF_MAX_CHAR_LENGTH so that a complete UChar32's UChars fit into it.

Parameters:
cnv   The converter that will get remaining UChars copied to its overflow area.
buffer   An array of UChars that was passed into a callback function or a toUnicode() function.
length   The number of code units (UChars) that are actually in the buffer. This must be >0.
Returns:
The code point from the first UChars in the buffer.

U_CFUNC int32_t * ucnv_updateCallbackOffsets ( int32_t * offsets,
int32_t length,
int32_t sourceIndex )
 

This helper function updates the offsets array after a callback function call.

It adds the sourceIndex to each offsets item, or sets each of them to -1 if sourceIndex==-1.

Parameters:
offsets   The pointer to offsets entry that corresponds to the first target unit that the callback wrote.
length   The number of output units that the callback wrote.
sourceIndex   The sourceIndex of the input sequence that the callback function was called for.
Returns:
offsets+length if offsets!=NULL, otherwise NULL


Variable Documentation

const UConverterSharedData _DBCSData
 

Definition at line 213 of file ucnv_cnv.h.

const UConverterSharedData _EBCDICStatefulData
 

Definition at line 215 of file ucnv_cnv.h.

const UConverterSharedData _HZData
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _ISO2022Data
 

Definition at line 215 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData1
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData11
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData16
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData17
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData18
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData19
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData2
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData3
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData4
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData5
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData6
 

Definition at line 216 of file ucnv_cnv.h.

const UConverterSharedData _LMBCSData8
 

Definition at line 217 of file ucnv_cnv.h.

const UConverterSharedData _Latin1Data
 

Definition at line 213 of file ucnv_cnv.h.

const UConverterSharedData _MBCSData
 

Definition at line 213 of file ucnv_cnv.h.

const UConverterSharedData _SBCSData
 

Definition at line 213 of file ucnv_cnv.h.

const UConverterSharedData _UTF16BEData
 

Definition at line 214 of file ucnv_cnv.h.

const UConverterSharedData _UTF16LEData
 

Definition at line 214 of file ucnv_cnv.h.

const UConverterSharedData _UTF32BEData
 

Definition at line 214 of file ucnv_cnv.h.

const UConverterSharedData _UTF32LEData
 

Definition at line 214 of file ucnv_cnv.h.

const UConverterSharedData _UTF8Data
 

Definition at line 214 of file ucnv_cnv.h.


Generated at Tue Dec 5 17:55:46 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000