RetroArch
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AutoUTFInputStream< CharType, InputByteStream > Class Template Reference

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

#include <encodedstream.h>

Collaboration diagram for AutoUTFInputStream< CharType, InputByteStream >:
[legend]

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 Ch(* TakeFunc) (InputByteStream &is)
 

Private Member Functions

 RAPIDJSON_STATIC_ASSERT (sizeof(typename InputByteStream::Ch)==1)
 
 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 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.

Member Typedef Documentation

◆ Ch

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

◆ TakeFunc

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

Constructor & Destructor Documentation

◆ AutoUTFInputStream() [1/2]

template<typename CharType, typename InputByteStream>
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.
Here is the call graph for this function:

◆ AutoUTFInputStream() [2/2]

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

Member Function Documentation

◆ DetectType()

template<typename CharType, typename InputByteStream>
void AutoUTFInputStream< CharType, InputByteStream >::DetectType ( )
inlineprivate
Here is the caller graph for this function:

◆ Flush()

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

◆ GetType()

template<typename CharType, typename InputByteStream>
UTFType AutoUTFInputStream< CharType, InputByteStream >::GetType ( ) const
inline
Here is the caller graph for this function:

◆ HasBOM()

template<typename CharType, typename InputByteStream>
bool AutoUTFInputStream< CharType, InputByteStream >::HasBOM ( ) const
inline
Here is the caller graph for this function:

◆ operator=()

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

◆ Peek()

template<typename CharType, typename InputByteStream>
Ch AutoUTFInputStream< CharType, InputByteStream >::Peek ( ) const
inline
Here is the caller graph for this function:

◆ Put()

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

◆ PutBegin()

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

◆ PutEnd()

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

◆ RAPIDJSON_STATIC_ASSERT()

template<typename CharType, typename InputByteStream>
AutoUTFInputStream< CharType, InputByteStream >::RAPIDJSON_STATIC_ASSERT ( sizeof(typename InputByteStream::Ch)  = =1)
private

◆ Take()

template<typename CharType, typename InputByteStream>
Ch AutoUTFInputStream< CharType, InputByteStream >::Take ( )
inline
Here is the caller graph for this function:

◆ Tell()

template<typename CharType, typename InputByteStream>
size_t AutoUTFInputStream< CharType, InputByteStream >::Tell ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ current_

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

◆ hasBOM_

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

◆ is_

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

◆ takeFunc_

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

◆ type_

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

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