NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
rapidjson::AutoUTFInputStream< CharType, InputByteStream > Class Template Reference

Search Toolkit Book for rapidjson::AutoUTFInputStream

Input stream wrapper with dynamically bound encoding and automatic encoding detection. More...

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

Public Types

typedef CharType Ch
 

Public Member Functions

 AutoUTFInputStream (InputByteStream &is, UTFType type=kUTF8)
 Constructor. More...
 
UTFType GetType () const
 
bool HasBOM () const
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
void Put (Ch)
 
void Flush ()
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Private Types

typedef ::rapidjson ::StaticAssertTest< sizeof(::rapidjson ::STATIC_ASSERTION_FAILURE< bool(sizeof(typename InputByteStream::Ch)==1) >)> RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
 
typedef Ch(* TakeFunc) (InputByteStream &is)
 

Private Member Functions

 AutoUTFInputStream (const AutoUTFInputStream &)
 
AutoUTFInputStreamoperator= (const AutoUTFInputStream &)
 
void DetectType ()
 

Private Attributes

InputByteStream * is_
 
UTFType type_
 
Ch current_
 
TakeFunc takeFunc_
 
bool hasBOM_
 

Detailed Description

template<typename CharType, typename InputByteStream>
class rapidjson::AutoUTFInputStream< CharType, InputByteStream >

Input stream wrapper with dynamically bound encoding and automatic encoding detection.

Template Parameters
CharTypeType of character for reading.
InputByteStreamtype of input byte stream to be wrapped.

Definition at line 135 of file encodedstream.h.

Member Typedef Documentation

◆ Ch

template<typename CharType , typename InputByteStream >
typedef CharType rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Ch

Definition at line 138 of file encodedstream.h.

◆ RAPIDJSON_JOIN

template<typename CharType , typename InputByteStream >
typedef :: rapidjson ::StaticAssertTest< sizeof(:: rapidjson ::STATIC_ASSERTION_FAILURE<bool( sizeof(typename InputByteStream::Ch) == 1 ) >)> rapidjson::AutoUTFInputStream< CharType, InputByteStream >::RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
private

Definition at line 136 of file encodedstream.h.

◆ TakeFunc

template<typename CharType , typename InputByteStream >
typedef Ch(* rapidjson::AutoUTFInputStream< CharType, InputByteStream >::TakeFunc) (InputByteStream &is)
private

Definition at line 219 of file encodedstream.h.

Constructor & Destructor Documentation

◆ AutoUTFInputStream() [1/2]

template<typename CharType , typename InputByteStream >
rapidjson::AutoUTFInputStream< CharType, InputByteStream >::AutoUTFInputStream ( InputByteStream &  is,
UTFType  type = kUTF8 
)
inline

Constructor.

Parameters
isinput stream to be wrapped.
typeUTF encoding type if it is not detected from the stream.

Definition at line 145 of file encodedstream.h.

References f(), rapidjson::kUTF32BE, rapidjson::kUTF8, RAPIDJSON_ASSERT, and RAPIDJSON_ENCODINGS_FUNC.

◆ AutoUTFInputStream() [2/2]

template<typename CharType , typename InputByteStream >
rapidjson::AutoUTFInputStream< CharType, InputByteStream >::AutoUTFInputStream ( const AutoUTFInputStream< CharType, InputByteStream > &  )
private

Member Function Documentation

◆ DetectType()

template<typename CharType , typename InputByteStream >
void rapidjson::AutoUTFInputStream< CharType, InputByteStream >::DetectType ( )
inlineprivate

◆ Flush()

template<typename CharType , typename InputByteStream >
void rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Flush ( void  )
inline

Definition at line 162 of file encodedstream.h.

References RAPIDJSON_ASSERT.

◆ GetType()

template<typename CharType , typename InputByteStream >
UTFType rapidjson::AutoUTFInputStream< CharType, InputByteStream >::GetType ( void  ) const
inline

Definition at line 153 of file encodedstream.h.

◆ HasBOM()

template<typename CharType , typename InputByteStream >
bool rapidjson::AutoUTFInputStream< CharType, InputByteStream >::HasBOM ( ) const
inline

Definition at line 154 of file encodedstream.h.

◆ operator=()

template<typename CharType , typename InputByteStream >
AutoUTFInputStream& rapidjson::AutoUTFInputStream< CharType, InputByteStream >::operator= ( const AutoUTFInputStream< CharType, InputByteStream > &  )
private

◆ Peek()

template<typename CharType , typename InputByteStream >
Ch rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Peek ( ) const
inline

Definition at line 156 of file encodedstream.h.

◆ Put()

template<typename CharType , typename InputByteStream >
void rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Put ( Ch  )
inline

Definition at line 161 of file encodedstream.h.

References RAPIDJSON_ASSERT.

◆ PutBegin()

template<typename CharType , typename InputByteStream >
Ch* rapidjson::AutoUTFInputStream< CharType, InputByteStream >::PutBegin ( )
inline

Definition at line 163 of file encodedstream.h.

References RAPIDJSON_ASSERT.

◆ PutEnd()

template<typename CharType , typename InputByteStream >
size_t rapidjson::AutoUTFInputStream< CharType, InputByteStream >::PutEnd ( Ch )
inline

Definition at line 164 of file encodedstream.h.

References RAPIDJSON_ASSERT.

◆ Take()

template<typename CharType , typename InputByteStream >
Ch rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Take ( )
inline

Definition at line 157 of file encodedstream.h.

◆ Tell()

template<typename CharType , typename InputByteStream >
size_t rapidjson::AutoUTFInputStream< CharType, InputByteStream >::Tell ( ) const
inline

Definition at line 158 of file encodedstream.h.

Member Data Documentation

◆ current_

template<typename CharType , typename InputByteStream >
Ch rapidjson::AutoUTFInputStream< CharType, InputByteStream >::current_
private

Definition at line 222 of file encodedstream.h.

◆ hasBOM_

template<typename CharType , typename InputByteStream >
bool rapidjson::AutoUTFInputStream< CharType, InputByteStream >::hasBOM_
private

Definition at line 224 of file encodedstream.h.

◆ is_

template<typename CharType , typename InputByteStream >
InputByteStream* rapidjson::AutoUTFInputStream< CharType, InputByteStream >::is_
private

Definition at line 220 of file encodedstream.h.

◆ takeFunc_

template<typename CharType , typename InputByteStream >
TakeFunc rapidjson::AutoUTFInputStream< CharType, InputByteStream >::takeFunc_
private

Definition at line 223 of file encodedstream.h.

◆ type_

template<typename CharType , typename InputByteStream >
UTFType rapidjson::AutoUTFInputStream< CharType, InputByteStream >::type_
private

Definition at line 221 of file encodedstream.h.


The documentation for this class was generated from the following file:
Modified on Mon May 27 04:39:51 2024 by modify_doxy.py rev. 669887