Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AutoUTFOutputStream< CharType, OutputByteStream > Class Template Reference

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

#include <encodedstream.h>

Public Types

typedef CharType Ch
 

Public Member Functions

 AutoUTFOutputStream (OutputByteStream &os, UTFType type, bool putBOM)
 Constructor. More...
 
void Flush ()
 
UTFType GetType () const
 
Ch Peek () const
 
void Put (Ch c)
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 
Ch Take ()
 
size_t Tell () const
 

Private Types

typedef void(* PutFunc) (OutputByteStream &, Ch)
 

Private Member Functions

 AutoUTFOutputStream (const AutoUTFOutputStream &)
 
AutoUTFOutputStreamoperator= (const AutoUTFOutputStream &)
 
void PutBOM ()
 
 RAPIDJSON_STATIC_ASSERT (sizeof(typename OutputByteStream::Ch)==1)
 

Private Attributes

OutputByteStream * os_
 
PutFunc putFunc_
 
UTFType type_
 

Detailed Description

template<typename CharType, typename OutputByteStream>
class AutoUTFOutputStream< CharType, OutputByteStream >

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

Template Parameters
CharTypeType of character for writing.
OutputByteStreamtype of output byte stream to be wrapped.

Definition at line 399 of file encodedstream.h.

Member Typedef Documentation

template<typename CharType , typename OutputByteStream >
typedef CharType AutoUTFOutputStream< CharType, OutputByteStream >::Ch

Definition at line 404 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
typedef void(* AutoUTFOutputStream< CharType, OutputByteStream >::PutFunc) (OutputByteStream &, Ch)
private

Definition at line 481 of file encodedstream.h.

Constructor & Destructor Documentation

template<typename CharType , typename OutputByteStream >
AutoUTFOutputStream< CharType, OutputByteStream >::AutoUTFOutputStream ( OutputByteStream &  os,
UTFType  type,
bool  putBOM 
)
inline

Constructor.

Parameters
osoutput stream to be wrapped.
typeUTF encoding type.
putBOMWhether to write BOM at the beginning of the stream.

Definition at line 412 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
AutoUTFOutputStream< CharType, OutputByteStream >::AutoUTFOutputStream ( const AutoUTFOutputStream< CharType, OutputByteStream > &  )
private

Member Function Documentation

template<typename CharType , typename OutputByteStream >
void AutoUTFOutputStream< CharType, OutputByteStream >::Flush ( )
inline

Definition at line 438 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
UTFType AutoUTFOutputStream< CharType, OutputByteStream >::GetType ( ) const
inline

Definition at line 429 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
AutoUTFOutputStream& AutoUTFOutputStream< CharType, OutputByteStream >::operator= ( const AutoUTFOutputStream< CharType, OutputByteStream > &  )
private
template<typename CharType , typename OutputByteStream >
Ch AutoUTFOutputStream< CharType, OutputByteStream >::Peek ( ) const
inline

Definition at line 444 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
void AutoUTFOutputStream< CharType, OutputByteStream >::Put ( Ch  c)
inline

Definition at line 434 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
Ch* AutoUTFOutputStream< CharType, OutputByteStream >::PutBegin ( )
inline

Definition at line 459 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
void AutoUTFOutputStream< CharType, OutputByteStream >::PutBOM ( )
inlineprivate

Definition at line 474 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
size_t AutoUTFOutputStream< CharType, OutputByteStream >::PutEnd ( Ch )
inline

Definition at line 464 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
AutoUTFOutputStream< CharType, OutputByteStream >::RAPIDJSON_STATIC_ASSERT ( sizeof(typename OutputByteStream::Ch)  = =1)
private
template<typename CharType , typename OutputByteStream >
Ch AutoUTFOutputStream< CharType, OutputByteStream >::Take ( )
inline

Definition at line 449 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
size_t AutoUTFOutputStream< CharType, OutputByteStream >::Tell ( ) const
inline

Definition at line 454 of file encodedstream.h.

Member Data Documentation

template<typename CharType , typename OutputByteStream >
OutputByteStream* AutoUTFOutputStream< CharType, OutputByteStream >::os_
private

Definition at line 483 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
PutFunc AutoUTFOutputStream< CharType, OutputByteStream >::putFunc_
private

Definition at line 485 of file encodedstream.h.

template<typename CharType , typename OutputByteStream >
UTFType AutoUTFOutputStream< CharType, OutputByteStream >::type_
private

Definition at line 484 of file encodedstream.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54