Torque2D Reference
Public Types | Public Member Functions | Static Public Member Functions | List of all members
UTF16< CharType > Struct Template Reference

UTF-16 encoding. More...

#include <encodings.h>

+ Inheritance diagram for UTF16< CharType >:

Public Types

typedef CharType Ch
 

Public Member Functions

 RAPIDJSON_STATIC_ASSERT (sizeof(Ch) >=2)
 

Static Public Member Functions

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)
 

Detailed Description

template<typename CharType = wchar_t>
struct rapidjson::UTF16< CharType >

UTF-16 encoding.

http://en.wikipedia.org/wiki/UTF-16 http://tools.ietf.org/html/rfc2781

Template Parameters
CharTypeType for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead.
Note
For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness. For streaming, use UTF16LE and UTF16BE, which handle endianness.

Member Typedef Documentation

typedef CharType Ch

Member Function Documentation

static bool Decode ( InputStream &  is,
unsigned *  codepoint 
)
inlinestatic
static void Encode ( OutputStream &  os,
unsigned  codepoint 
)
inlinestatic
RAPIDJSON_STATIC_ASSERT ( sizeof(Ch) >=  2)
static bool Validate ( InputStream &  is,
OutputStream &  os 
)
inlinestatic

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