UTF-32 big endian encoding.
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 UTF32BE< CharType >
Definition at line 496 of file encodings.h.
◆ Put()
template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32BE< CharType >::Put |
( |
OutputByteStream & | os, |
|
|
CharType | c ) |
|
inlinestatic |
Definition at line 524 of file encodings.h.
524 {
526 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 24) & 0xFFu));
527 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 16) & 0xFFu));
528 os.Put(
static_cast<typename OutputByteStream::Ch
>((c >> 8) & 0xFFu));
529 os.Put(
static_cast<typename OutputByteStream::Ch
>(c & 0xFFu));
530 }
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
◆ PutBOM()
template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32BE< CharType >::PutBOM |
( |
OutputByteStream & | os | ) |
|
|
inlinestatic |
Definition at line 515 of file encodings.h.
515 {
517 os.Put(
static_cast<typename OutputByteStream::Ch
>(0x00u));
518 os.Put(
static_cast<typename OutputByteStream::Ch
>(0x00u));
519 os.Put(
static_cast<typename OutputByteStream::Ch
>(0xFEu));
520 os.Put(
static_cast<typename OutputByteStream::Ch
>(0xFFu));
521 }
◆ Take()
template<typename CharType = unsigned>
template<typename InputByteStream >
static CharType UTF32BE< CharType >::Take |
( |
InputByteStream & | is | ) |
|
|
inlinestatic |
Definition at line 505 of file encodings.h.
505 {
507 unsigned c =
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 24;
508 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 16;
509 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take())) << 8;
510 c |=
static_cast<unsigned>(
static_cast<uint8_t>(is.Take()));
511 return static_cast<CharType>(c);
512 }
◆ TakeBOM()
template<typename CharType = unsigned>
template<typename InputByteStream >
static CharType UTF32BE< CharType >::TakeBOM |
( |
InputByteStream & | is | ) |
|
|
inlinestatic |
Definition at line 498 of file encodings.h.
498 {
500 CharType c =
Take(is);
501 return static_cast<uint32_t>(c) == 0x0000FEFFu ?
Take(is) : c;
502 }
static CharType Take(InputByteStream &is)
The documentation for this struct was generated from the following file:
- libraries/fc/include/fc/crypto/webauthn_json/include/rapidjson/encodings.h