MDTraits_UTF16 Class Reference

#include <mdtraits.h>

Inheritance diagram for MDTraits_UTF16:

MDTraits_UInt16 MDTraits_Int16 MDTraits_BasicInt 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 not converted!
virtual std::string GetString (MDValuePtr Object)
 Get string from a UTF16 - returns UTF8 coded version of a single UTF16 code unit - surrogates are not converted!

Member Function Documentation

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

A unique name for this trait.

Reimplemented from MDTraits_UInt16.

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

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

Note:
Invalid input strings (such as incomplete multi-byte UTF-8 sequences) will produce unpredictable results
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

< Buffer to hold the UTF-8 version

< Built UTF-16 version

Reimplemented from MDTraits_BasicInt.

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

Get string from a UTF16 - returns UTF8 coded version of a single UTF16 code unit - surrogates are not 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

Reimplemented from MDTraits_UInt16.


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