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

UTF-16 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 UTF16< 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 UTF16< CharType >
enum  { supportUnicode = 1 }
 
typedef CharType Ch
 
- Public Member Functions inherited from UTF16< CharType >
 RAPIDJSON_STATIC_ASSERT (sizeof(Ch) >=2)
 

Detailed Description

template<typename CharType = wchar_t>
struct UTF16BE< CharType >

UTF-16 big endian encoding.

Member Function Documentation

template<typename CharType = wchar_t>
template<typename OutputByteStream >
static void UTF16BE< CharType >::Put ( OutputByteStream &  os,
CharType  c 
)
inlinestatic
353  {
354  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
355  os.Put((c >> 8) & 0xFFu);
356  os.Put(c & 0xFFu);
357  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=2)

+ Here is the call graph for this function:

template<typename CharType = wchar_t>
template<typename OutputByteStream >
static void UTF16BE< CharType >::PutBOM ( OutputByteStream &  os)
inlinestatic
347  {
348  RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
349  os.Put(0xFEu); os.Put(0xFFu);
350  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=2)

+ Here is the call graph for this function:

template<typename CharType = wchar_t>
template<typename InputByteStream >
static CharType UTF16BE< CharType >::Take ( InputByteStream &  is)
inlinestatic
339  {
340  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
341  CharType c = (unsigned char)is.Take() << 8;
342  c |= (unsigned char)is.Take();
343  return c;
344  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=2)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename CharType = wchar_t>
template<typename InputByteStream >
static CharType UTF16BE< CharType >::TakeBOM ( InputByteStream &  is)
inlinestatic
332  {
333  RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
334  CharType c = Take(is);
335  return (unsigned short)c == 0xFEFFu ? Take(is) : c;
336  }
RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >=2)
static CharType Take(InputByteStream &is)
Definition: encodings.h:339

+ Here is the call graph for this function:


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