fe::enc_traits_utf16< CodeUnitType > Struct Template Reference
[Ferry Core library]

UTF16 encoding traits. More...

List of all members.

Static Public Member Functions

static unsigned code_unit_size (utf32_char_type chr)
static bool is_high_surrogate (code_unit_type c)
static bool is_low_surrogate (code_unit_type c)
static bool is_surrogate (code_unit_type c)


Detailed Description

template<class CodeUnitType>
struct fe::enc_traits_utf16< CodeUnitType >

UTF16 encoding traits.

A utility class to read UTF16-encoded character data.

Note:
Don't use functions of this class other then documented ones directly. The class is intended for use as a specialization for fe::UTF32Iterator template.
See also:
http://en.wikipedia.org/wiki/UTF-16

Member Function Documentation

template<class CodeUnitType >
static bool fe::enc_traits_utf16< CodeUnitType >::is_high_surrogate ( code_unit_type  c  )  [inline, static]

Returns true if the passed in UTF16 code unit is a high order element of a surrogate pair.

Parameters:
c code unit to test.

template<class CodeUnitType >
static bool fe::enc_traits_utf16< CodeUnitType >::is_low_surrogate ( code_unit_type  c  )  [inline, static]

Returns true if the passed in UTF16 code unit is a low order element of a surrogate pair.

Parameters:
c code unit to test.

template<class CodeUnitType >
static bool fe::enc_traits_utf16< CodeUnitType >::is_surrogate ( code_unit_type  c  )  [inline, static]

Returns true if the passed in UTF16 code unit is either high or low order element of a surrogate pair.

Parameters:
c code unit to test.

template<class CodeUnitType >
static unsigned fe::enc_traits_utf16< CodeUnitType >::code_unit_size ( utf32_char_type  chr  )  [inline, static]

Returns number of UTF16 code units needed to represent the given UTF32-encoded character.

Parameters:
chr UTF32-encoded character test.


The documentation for this struct was generated from the following file:

Generated on Tue Nov 18 21:08:23 2008 for Ferry by doxygen 1.5.7.1
http://sourceforge.net