Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 1546 of file pugixml.cc.

Member Typedef Documentation

◆ value_type

typedef uint16_t* utf16_writer::value_type

Definition at line 1548 of file pugixml.cc.

Member Function Documentation

◆ any()

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

Definition at line 1568 of file pugixml.cc.

1569 {
1570 return (ch < 0x10000) ? low(result, ch) : high(result, ch);
1571 }
static value_type high(value_type result, uint32_t ch)
Definition pugixml.cc:1557
static value_type low(value_type result, uint32_t ch)
Definition pugixml.cc:1550

◆ high()

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

Definition at line 1557 of file pugixml.cc.

1558 {
1559 uint32_t msh = static_cast<uint32_t>(ch - 0x10000) >> 10;
1560 uint32_t lsh = static_cast<uint32_t>(ch - 0x10000) & 0x3ff;
1561
1562 result[0] = static_cast<uint16_t>(0xD800 + msh);
1563 result[1] = static_cast<uint16_t>(0xDC00 + lsh);
1564
1565 return result + 2;
1566 }

Referenced by any().

◆ low()

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

Definition at line 1550 of file pugixml.cc.

1551 {
1552 *result = static_cast<uint16_t>(ch);
1553
1554 return result + 1;
1555 }

Referenced by any().


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