utf16_writer Struct Reference

## 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

## value_type

typedef uint16_t* utf16_writer::value_type

Definition at line 845 of file pugixml.cpp.

## Member Function Documentation

## any()

static value_type utf16_writer::any | ( | value_type | result,
|  | uint32_t | ch
| ) |  |

inline static

Definition at line 865 of file pugixml.cpp.

{
return (ch < 0x10000) ? low(result, ch) : high(result, ch);
}
utf16_writer::high
static value_type high(value_type result, uint32_t ch)
Definition: pugixml.cpp:854
utf16_writer::low
static value_type low(value_type result, uint32_t ch)
Definition: pugixml.cpp:847

References high(), and low().

## high()

static value_type utf16_writer::high | ( | value_type | result,
|  | uint32_t | ch
| ) |  |

inline static

Definition at line 854 of file pugixml.cpp.

{
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;
}
uint16_t
unsigned short uint16_t
Definition: stdint_msvc.h:80
uint32_t
unsigned int uint32_t
Definition: stdint_msvc.h:81

Referenced by any().

## low()

static value_type utf16_writer::low | ( | value_type | result,
|  | uint32_t | ch
| ) |  |

inline static

Definition at line 847 of file pugixml.cpp.

{
*result = static_cast<uint16_t>(ch);
return result + 1;
}

Referenced by any().

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

- pugixml.cpp