Public Types | Static Public Member Functions | List of all members
utf16_writer Struct Reference

Public Types

typedef uint16_tvalue_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

Definition at line 845 of file pugixml.cpp.

Member Function Documentation

◆ any()

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

Definition at line 865 of file pugixml.cpp.

866  {
867  return (ch < 0x10000) ? low(result, ch) : high(result, ch);
868  }

References high(), and low().

◆ high()

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

Definition at line 854 of file pugixml.cpp.

855  {
856  uint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;
857  uint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;
858 
859  result[0] = static_cast<uint16_t>(0xD800 + msh);
860  result[1] = static_cast<uint16_t>(0xDC00 + lsh);
861 
862  return result + 2;
863  }

Referenced by any().

◆ low()

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

Definition at line 847 of file pugixml.cpp.

848  {
849  *result = static_cast<uint16_t>(ch);
850 
851  return result + 1;
852  }

Referenced by any().


The documentation for this struct was generated from the following file:
uint16_t
unsigned short uint16_t
Definition: stdint_msvc.h:80
utf16_writer::low
static value_type low(value_type result, uint32_t ch)
Definition: pugixml.cpp:847
utf16_writer::high
static value_type high(value_type result, uint32_t ch)
Definition: pugixml.cpp:854
uint32_t
unsigned int uint32_t
Definition: stdint_msvc.h:81

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001