NCBI C++ ToolKit
Public Types | Static Public Member Functions | List of all members
rapidjson::UTF8< CharType > Struct Template Reference

Search Toolkit Book for rapidjson::UTF8

UTF-8 encoding. More...

#include <misc/jsonwrapp/rapidjson11/encodings.h>

Public Types

enum  { supportUnicode = 1 }
 
typedef CharType Ch
 

Static Public Member Functions

template<typename OutputStream >
static void Encode (OutputStream &os, unsigned codepoint)
 
template<typename OutputStream >
static void EncodeUnsafe (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)
 
static unsigned char GetRange (unsigned char c)
 
template<typename InputByteStream >
static CharType TakeBOM (InputByteStream &is)
 
template<typename InputByteStream >
static Ch Take (InputByteStream &is)
 
template<typename OutputByteStream >
static void PutBOM (OutputByteStream &os)
 
template<typename OutputByteStream >
static void Put (OutputByteStream &os, Ch c)
 

Detailed Description

template<typename CharType = char>
struct rapidjson::UTF8< CharType >

UTF-8 encoding.

http://en.wikipedia.org/wiki/UTF-8 http://tools.ietf.org/html/rfc3629

Template Parameters
CharTypeCode unit for storing 8-bit UTF-8 data. Default is char.
Note
implements Encoding concept

Definition at line 96 of file encodings.h.

Member Typedef Documentation

◆ Ch

template<typename CharType = char>
typedef CharType rapidjson::UTF8< CharType >::Ch

Definition at line 97 of file encodings.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename CharType = char>
anonymous enum
Enumerator
supportUnicode 

Definition at line 99 of file encodings.h.

Member Function Documentation

◆ Decode()

template<typename CharType = char>
template<typename InputStream >
static bool rapidjson::UTF8< CharType >::Decode ( InputStream &  is,
unsigned *  codepoint 
)
inlinestatic

Definition at line 146 of file encodings.h.

References COPY, result, TAIL, TRANS, and type.

◆ Encode()

template<typename CharType = char>
template<typename OutputStream >
static void rapidjson::UTF8< CharType >::Encode ( OutputStream &  os,
unsigned  codepoint 
)
inlinestatic

Definition at line 102 of file encodings.h.

References RAPIDJSON_ASSERT.

◆ EncodeUnsafe()

template<typename CharType = char>
template<typename OutputStream >
static void rapidjson::UTF8< CharType >::EncodeUnsafe ( OutputStream &  os,
unsigned  codepoint 
)
inlinestatic

Definition at line 124 of file encodings.h.

References rapidjson::PutUnsafe(), and RAPIDJSON_ASSERT.

◆ GetRange()

template<typename CharType = char>
static unsigned char rapidjson::UTF8< CharType >::GetRange ( unsigned char  c)
inlinestatic

Definition at line 204 of file encodings.h.

◆ Put()

template<typename CharType = char>
template<typename OutputByteStream >
static void rapidjson::UTF8< CharType >::Put ( OutputByteStream &  os,
Ch  c 
)
inlinestatic

Definition at line 250 of file encodings.h.

References RAPIDJSON_STATIC_ASSERT.

◆ PutBOM()

template<typename CharType = char>
template<typename OutputByteStream >
static void rapidjson::UTF8< CharType >::PutBOM ( OutputByteStream &  os)
inlinestatic

Definition at line 242 of file encodings.h.

References RAPIDJSON_STATIC_ASSERT.

◆ Take()

template<typename CharType = char>
template<typename InputByteStream >
static Ch rapidjson::UTF8< CharType >::Take ( InputByteStream &  is)
inlinestatic

Definition at line 236 of file encodings.h.

References RAPIDJSON_STATIC_ASSERT.

◆ TakeBOM()

template<typename CharType = char>
template<typename InputByteStream >
static CharType rapidjson::UTF8< CharType >::TakeBOM ( InputByteStream &  is)
inlinestatic

Definition at line 223 of file encodings.h.

References RAPIDJSON_STATIC_ASSERT.

◆ Validate()

template<typename CharType = char>
template<typename InputStream , typename OutputStream >
static bool rapidjson::UTF8< CharType >::Validate ( InputStream &  is,
OutputStream &  os 
)
inlinestatic

Definition at line 179 of file encodings.h.

References COPY, result, TAIL, and TRANS.


The documentation for this struct was generated from the following file:
Modified on Sat May 04 13:12:33 2024 by modify_doxy.py rev. 669887