Inheritance diagram for CP_UTF8TextEncoder:
Public Member Functions | |
Constructor / Destructor | |
CP_UTF8TextEncoder (bool inUseCompositeChars=false) | |
Constructor. | |
virtual | ~CP_UTF8TextEncoder () |
Destructor. | |
Cloning | |
virtual CP_TextEncoder * | Clone () const |
Converters | |
virtual UInt32 | ToUTF16 (const char *inSrcChars, UInt32 inSrcLength, CPUniChar *inDestChars, UInt32 inDestLength) const |
virtual UInt32 | FromUTF16 (const CPUniChar *inSrcChars, UInt32 inSrcLength, char *inDestChars, UInt32 inDestLength) const |
Getters | |
virtual UInt32 | GetDestLength (const char *inSrcChars, UInt32 inSrcLength) const |
virtual UInt32 | GetEncodingType () const |
Static Public Member Functions | |
static const CP_UTF8TextEncoder * | SharedTextEncoder () |
Accessor for shared text encoder object. | |
static CP_Mutex & | SharedTextEncoderMutex () |
Get Mutex for synchronizing access to shared text encoder object. | |
Protected Attributes | |
bool | fUseSystemEncoder |
TECObjectRef | fTo16TEC |
TECObjectRef | fFrom16TEC |
bool | fHasMacCodePage |
UInt32 | fTextFormat |
bool | fUseCompositeCharacters |
UInt32 | fConvertToUTF16Flags |
UInt32 | fConvertFromUTF16Flags |
const CPUniChar * | fEncoding |
TextToUnicodeInfo | fTextToUnicodeInfo |
UnicodeToTextInfo | fUnicodeToTextInfo |
Private Member Functions | |
Testers | |
bool | IsValidUTF8ForSystem (const char *inSrcChars, UInt32 inSrcLength) const |
bool | IsValidUTF8 (const char *inSrcChars, UInt32 inSrcLength) const |
bool | IsValidUTF16ForSystem (const CPUniChar *inSrcChars, UInt32 inSrcLength) const |
bool | IsValidUTF16 (const CPUniChar *inSrcChars, UInt32 inSrcLength) const |
|
Constructor.
|
|
Destructor. |
|
Returns the shared instance of a CP_UTF8TextEncoder.
|
|
|
|
Returns a new text encoder object of the same type as this object.
Implements CP_TextEncoder. |
|
Converts the passed in string to UTF16 encoding.
Reimplemented from CP_TextEncoder. |
|
Converts the passed in string from UTF16 encoding to the encoders type.
Reimplemented from CP_TextEncoder. |
|
Returns the approximate length that the converted passed in string will occupy. You can use this before converting the text to get an approximate size of the converted text to know how much memory to allocate for the buffer to hold the converted text. The returned length is only an approximation, as no actual conversion takes place.
Reimplemented from CP_TextEncoder. |
|
Reimplemented from CP_TextEncoder. |
|
Used to determine if the passed in char * text is valid for the encoding converted on the installed OS.
|
|
Used to determine if the passed in char * text is valid UTF8 text.
|
|
Used to determine if the passed in CPUniChar * text is valid for the encoding converted on the installed OS.
|
|
Used to determine if the passed in CPUniChar * text is valid UTF16 text.
|
|
Sets up the flags and various data members based on the passed in flags which are used to determine features and how errors are handled in the conversion.
|
|
Sets up the flags and various data members based on the passed in flags which are used to determine features and how errors are handled in the conversion.
|
|
Returns the approximate length that the converted passed in string will occupy. You can use this before converting the text to get an approximate size of the converted text to know how much memory to allocate for the buffer to hold the converted text. The returned length is only an approximation, as no actual conversion takes place.
Reimplemented in CP_MacRomanTextEncoder. |
|
Return the name of this encoder as a CPUniChar * string. |
|
UnicodeToTexUnicode info structure used on the Mac. |
|
MacOS - Returns the version of the TextEncoding Converter installed on the MacOS.
|
|
|
|
Flag to indicate if the encoding is done by the system. |
|
Mac TextEncoding ref to go to UTF16 encoding. |
|
Mac TextEncoding ref to go from UTF16 encoding. |
|
|
|
Format of the text. |
|
Flag to indicate if we are using composite characters. |
|
Flag used in converting to UTF16. |
|
Flag used in converting from UTF16. |
|
The encoding being used, expressed as a CPUniChar *string. |
|
TextToUnicode info structure used on the Mac. |