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

UTF-32 little endian enocoding. 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 UTF32LE< CharType >

UTF-32 little endian enocoding.

Member Function Documentation

template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32LE< CharType >::Put ( OutputByteStream &  os,
CharType  c 
)
inlinestatic
429  {
430  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
431  os.Put(c & 0xFFu);
432  os.Put((c >> 8) & 0xFFu);
433  os.Put((c >> 16) & 0xFFu);
434  os.Put((c >> 24) & 0xFFu);
435  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:

template<typename CharType = unsigned>
template<typename OutputByteStream >
static void UTF32LE< CharType >::PutBOM ( OutputByteStream &  os)
inlinestatic
423  {
424  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
425  os.Put(0xFFu); os.Put(0xFEu); os.Put(0x00u); os.Put(0x00u);
426  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=4)

+ Here is the call graph for this function:

template<typename CharType = unsigned>
template<typename InputByteStream >
static CharType UTF32LE< CharType >::Take ( InputByteStream &  is)
inlinestatic
413  {
414  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
415  CharType c = (unsigned char)is.Take();
416  c |= (unsigned char)is.Take() << 8;
417  c |= (unsigned char)is.Take() << 16;
418  c |= (unsigned char)is.Take() << 24;
419  return c;
420  }
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 UTF32LE< CharType >::TakeBOM ( InputByteStream &  is)
inlinestatic
406  {
407  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
408  CharType c = Take(is);
409  return (unsigned)c == 0x0000FEFFu ? Take(is) : c;
410  }
static CharType Take(InputByteStream &is)
Definition: encodings.h:413
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: