Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
AutoUTFInputStream< CharType, InputByteStream > Class Template Reference

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

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/encodedstream.h>

Collaboration diagram for AutoUTFInputStream< CharType, InputByteStream >:

Public Types

typedef CharType Ch

Public Member Functions

 AutoUTFInputStream (InputByteStream &is, UTFType type=kUTF8)
 Constructor.
UTFType GetType () const
bool HasBOM () const
Ch Peek () const
Ch Take ()
size_t Tell () const
void Put (Ch)
void Flush ()
Ch * PutBegin ()
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.

Definition at line 136 of file encodedstream.h.

Member Typedef Documentation

◆ Ch

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

Definition at line 139 of file encodedstream.h.

◆ TakeFunc

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

Definition at line 220 of file encodedstream.h.

Constructor & Destructor Documentation

◆ AutoUTFInputStream()

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.

Definition at line 146 of file encodedstream.h.

References RAPIDJSON_ASSERT.

Member Function Documentation

◆ DetectType()

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

Definition at line 172 of file encodedstream.h.

◆ Flush()

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

Definition at line 163 of file encodedstream.h.

◆ GetType()

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

Definition at line 154 of file encodedstream.h.

◆ HasBOM()

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

Definition at line 155 of file encodedstream.h.

◆ Peek()

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

Definition at line 157 of file encodedstream.h.

◆ Put()

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

Definition at line 162 of file encodedstream.h.

◆ PutBegin()

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

Definition at line 164 of file encodedstream.h.

◆ PutEnd()

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

Definition at line 165 of file encodedstream.h.

◆ Take()

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

Definition at line 158 of file encodedstream.h.

◆ Tell()

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

Definition at line 159 of file encodedstream.h.

Member Data Documentation

◆ current_

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

Definition at line 223 of file encodedstream.h.

◆ hasBOM_

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

Definition at line 225 of file encodedstream.h.

◆ is_

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

Definition at line 221 of file encodedstream.h.

◆ takeFunc_

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

Definition at line 224 of file encodedstream.h.

◆ type_

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

Definition at line 222 of file encodedstream.h.


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