UTF-32 little endian enocoding.
More...
#include <encodings.h>
|
| template<typename InputByteStream > |
| static CharType | TakeBOM (InputByteStream &is) |
| |
| template<typename InputByteStream > |
| static CharType | Take (InputByteStream &is) |
| |
| template<typename OutputByteStream > |
| static void | PutBOM (OutputByteStream &os) |
| |
| template<typename OutputByteStream > |
| static void | Put (OutputByteStream &os, CharType c) |
| |
| static void | Encode (OutputStream &os, unsigned codepoint) |
| |
| static void | EncodeUnsafe (OutputStream &os, unsigned codepoint) |
| |
| static bool | Decode (InputStream &is, unsigned *codepoint) |
| |
| static bool | Validate (InputStream &is, OutputStream &os) |
| |
template<typename CharType = unsigned>
struct UTF32LE< CharType >
UTF-32 little endian enocoding.
Definition at line 457 of file encodings.h.
◆ Put()
template<typename CharType = unsigned>
template<typename OutputByteStream >
| static void UTF32LE< CharType >::Put |
( |
OutputByteStream & |
os, |
|
|
CharType |
c |
|
) |
| |
|
inlinestatic |
Definition at line 485 of file encodings.h.
487 os.Put(
static_cast<typename OutputByteStream::Ch
>(c & 0xFFu));
488 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 8) & 0xFFu));
489 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 16) & 0xFFu));
490 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 24) & 0xFFu));
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)
◆ PutBOM()
template<typename CharType = unsigned>
template<typename OutputByteStream >
| static void UTF32LE< CharType >::PutBOM |
( |
OutputByteStream & |
os | ) |
|
|
inlinestatic |
Definition at line 476 of file encodings.h.
478 os.Put(
static_cast<typename OutputByteStream::Ch
>(0xFFu));
479 os.Put(
static_cast<typename OutputByteStream::Ch
>(0xFEu));
480 os.Put(
static_cast<typename OutputByteStream::Ch
>(0x00u));
481 os.Put(
static_cast<typename OutputByteStream::Ch
>(0x00u));
◆ Take()
template<typename CharType = unsigned>
template<typename InputByteStream >
| static CharType UTF32LE< CharType >::Take |
( |
InputByteStream & |
is | ) |
|
|
inlinestatic |
Definition at line 466 of file encodings.h.
468 unsigned c =
static_cast<uint8_t>(is.Take());
469 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 8;
470 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 16;
471 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 24;
472 return static_cast<CharType
>(c);
◆ TakeBOM()
template<typename CharType = unsigned>
template<typename InputByteStream >
| static CharType UTF32LE< CharType >::TakeBOM |
( |
InputByteStream & |
is | ) |
|
|
inlinestatic |
Definition at line 459 of file encodings.h.
461 CharType c =
Take(is);
462 return static_cast<uint32_t>(c) == 0x0000FEFFu ?
Take(is) : c;
static CharType Take(InputByteStream &is)
The documentation for this struct was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-4.0.0.0/external/rapidjson/include/rapidjson/encodings.h