Public Types | Static Public Member Functions
utf16_writer Struct Reference

List of all members.

Public Types

typedef uint16_t * value_type

Static Public Member Functions

static value_type low (value_type result, uint32_t ch)
static value_type high (value_type result, uint32_t ch)
static value_type any (value_type result, uint32_t ch)

Detailed Description

Definition at line 843 of file pugixml.cpp.


Member Typedef Documentation

typedef uint16_t* utf16_writer::value_type

Definition at line 845 of file pugixml.cpp.


Member Function Documentation

static value_type utf16_writer::any ( value_type  result,
uint32_t  ch 
) [inline, static]

Definition at line 865 of file pugixml.cpp.

References high(), and low().

                {
                        return (ch < 0x10000) ? low(result, ch) : high(result, ch);
                }
static value_type utf16_writer::high ( value_type  result,
uint32_t  ch 
) [inline, static]

Definition at line 854 of file pugixml.cpp.

Referenced by any().

                {
                        uint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;
                        uint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;

                        result[0] = static_cast<uint16_t>(0xD800 + msh);
                        result[1] = static_cast<uint16_t>(0xDC00 + lsh);

                        return result + 2;
                }
static value_type utf16_writer::low ( value_type  result,
uint32_t  ch 
) [inline, static]

Definition at line 847 of file pugixml.cpp.

Referenced by any().

                {
                        *result = static_cast<uint16_t>(ch);

                        return result + 1;
                }

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

Generated on Mon Sep 15 2014 01:23:55 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001