MDTraits_UTF16String Class Reference

#include <mdtraits.h>

Inheritance diagram for MDTraits_UTF16String:

MDTraits_BasicStringArray MDTraits_BasicArray MDTraits RefCount IRefCount List of all members.

Public Member Functions

virtual std::string Name () const
 A unique name for this trait.

Protected Member Functions

virtual void SetString (MDValuePtr Object, std::string Val)
 Set a UTF16 from a string containing a UTF8 character - surrogates are converted.
virtual std::string GetString (MDValuePtr Object)
 Get UTF8 string from a UTF16 string - surrogates are converted.

Member Function Documentation

virtual std::string Name ( void   )  const [inline, virtual]

A unique name for this trait.

Reimplemented from MDTraits_BasicStringArray.

void SetString ( MDValuePtr  Object,
std::string  Val 
) [protected, virtual]

Set a UTF16 from a string containing a UTF8 character - surrogates are converted.

Unicode Table 3-5. UTF-8 Bit Distribution Unicode 1st Byte 2nd Byte 3rd Byte 4th Byte 00000000 0xxxxxxx 0xxxxxxx 00000yyy yyxxxxxx 110yyyyy 10xxxxxx zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx

Unicode Table 3-4. UTF-16 Bit Distribution xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 000uuuuu xxxxxxxx xxxxxxxx 110110ww wwxxxxxx 110111xx xxxxxxxx Where wwww = uuuuu - 1.

So UTF8 -> UTF16 (surrogate-pair): 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx 110110ww wwzzzzyy 110111yy yyxxxxxx

< Length of the UTF-8 version

< Buffer to hold the UTF-8 version

< Length of returned UTF-16 string (in 16-bit words)

< Built UTF-16 version of the current character

Reimplemented from MDTraits_BasicStringArray.

std::string GetString ( MDValuePtr  Object  )  [protected, virtual]

Get UTF8 string from a UTF16 string - surrogates are converted.

Unicode Table 3-5. UTF-8 Bit Distribution Unicode 1st Byte 2nd Byte 3rd Byte 4th Byte 00000000 0xxxxxxx 0xxxxxxx 00000yyy yyxxxxxx 110yyyyy 10xxxxxx zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx

Unicode Table 3-4. UTF-16 Bit Distribution xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 000uuuuu xxxxxxxx xxxxxxxx 110110ww wwxxxxxx 110111xx xxxxxxxx Where wwww = uuuuu - 1.

So UTF16 (surrogate-pair) -> UTF8: 110110ww wwzzzzyy 110111yy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx

< Return value being built

< Buffer for building each Unicode symbol

< First surrogate if processing a pair

Reimplemented from MDTraits_BasicStringArray.


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 15:21:00 2007 for MXFLib by  doxygen 1.5.1-p1