RetroArch
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...
 
UTFType GetType () const
 
void Put (Ch c)
 
void Flush ()
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Private Types

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

Private Member Functions

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

Private Attributes

OutputByteStream * os_
 
UTFType type_
 
PutFunc putFunc_
 

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.

Member Typedef Documentation

◆ Ch

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

◆ PutFunc

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

Constructor & Destructor Documentation

◆ AutoUTFOutputStream() [1/2]

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.
Here is the call graph for this function:

◆ AutoUTFOutputStream() [2/2]

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

Member Function Documentation

◆ Flush()

template<typename CharType, typename OutputByteStream>
void AutoUTFOutputStream< CharType, OutputByteStream >::Flush ( )
inline
Here is the caller graph for this function:

◆ GetType()

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

◆ operator=()

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

◆ Peek()

template<typename CharType, typename OutputByteStream>
Ch AutoUTFOutputStream< CharType, OutputByteStream >::Peek ( ) const
inline

◆ Put()

template<typename CharType, typename OutputByteStream>
void AutoUTFOutputStream< CharType, OutputByteStream >::Put ( Ch  c)
inline
Here is the caller graph for this function:

◆ PutBegin()

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

◆ PutBOM()

template<typename CharType, typename OutputByteStream>
void AutoUTFOutputStream< CharType, OutputByteStream >::PutBOM ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PutEnd()

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

◆ RAPIDJSON_STATIC_ASSERT()

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

◆ Take()

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

◆ Tell()

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

Member Data Documentation

◆ os_

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

◆ putFunc_

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

◆ type_

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

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