TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UTF32BE< CharType > Struct Template Reference

UTF-32 big endian encoding. More...

#include <encodings.h>

Static Public Member Functions

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 Public Member Functions inherited from UTF32< CharType >
template<typename OutputStream >
static void Encode (OutputStream &os, unsigned codepoint)
 
template<typename InputStream >
static bool Decode (InputStream &is, unsigned *codepoint)
 
template<typename InputStream , typename OutputStream >
static bool Validate (InputStream &is, OutputStream &os)
 

Additional Inherited Members

- Public Types inherited from UTF32< CharType >
enum  { supportUnicode = 1 }
 
typedef CharType Ch
 
- Public Member Functions inherited from UTF32< CharType >
 RAPIDJSON_STATIC_ASSERT (sizeof(Ch) >=4)
 

Detailed Description

template<typename CharType = unsigned>
struct UTF32BE< CharType >

UTF-32 big endian encoding.

Member Function Documentation

template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32BE< CharType >::Put ( OutputByteStream &  os,
CharType  c 
)
inlinestatic
465  {
466  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
467  os.Put((c >> 24) & 0xFFu);
468  os.Put((c >> 16) & 0xFFu);
469  os.Put((c >> 8) & 0xFFu);
470  os.Put(c & 0xFFu);
471  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:

template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32BE< CharType >::PutBOM ( OutputByteStream &  os)
inlinestatic
459  {
460  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
461  os.Put(0x00u); os.Put(0x00u); os.Put(0xFEu); os.Put(0xFFu);
462  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:

template<typename CharType = unsigned>
template<typename InputByteStream >
static CharType UTF32BE< CharType >::Take ( InputByteStream &  is)
inlinestatic
449  {
450  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
451  CharType c = (unsigned char)is.Take() << 24;
452  c |= (unsigned char)is.Take() << 16;
453  c |= (unsigned char)is.Take() << 8;
454  c |= (unsigned char)is.Take();
455  return c;
456  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename CharType = unsigned>
template<typename InputByteStream >
static CharType UTF32BE< CharType >::TakeBOM ( InputByteStream &  is)
inlinestatic
442  {
443  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
444  CharType c = Take(is);
445  return (unsigned)c == 0x0000FEFFu ? Take(is) : c;
446  }
static CharType Take(InputByteStream &is)
Definition: encodings.h:449
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:


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