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

#include <encodedstream.h>

Public Types

typedef CharType Ch
 

Public Member Functions

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

Private Types

typedef Ch(* TakeFunc) (InputByteStream &is)
 

Private Member Functions

 AutoUTFInputStream (const AutoUTFInputStream &)
 
void DetectType ()
 
AutoUTFInputStreamoperator= (const AutoUTFInputStream &)
 
 RAPIDJSON_STATIC_ASSERT (sizeof(typename InputByteStream::Ch)==1)
 

Private Attributes

Ch current_
 
bool hasBOM_
 
InputByteStream * is_
 
TakeFunc takeFunc_
 
UTFType type_
 

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 169 of file encodedstream.h.

Member Typedef Documentation

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

Definition at line 173 of file encodedstream.h.

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

Definition at line 307 of file encodedstream.h.

Constructor & Destructor Documentation

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 180 of file encodedstream.h.

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

Member Function Documentation

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

Definition at line 217 of file encodedstream.h.

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

Definition at line 202 of file encodedstream.h.

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

Definition at line 189 of file encodedstream.h.

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

Definition at line 190 of file encodedstream.h.

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

Definition at line 192 of file encodedstream.h.

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

Definition at line 201 of file encodedstream.h.

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

Definition at line 203 of file encodedstream.h.

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

Definition at line 207 of file encodedstream.h.

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

Definition at line 193 of file encodedstream.h.

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

Definition at line 198 of file encodedstream.h.

Member Data Documentation

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

Definition at line 310 of file encodedstream.h.

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

Definition at line 312 of file encodedstream.h.

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

Definition at line 308 of file encodedstream.h.

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

Definition at line 311 of file encodedstream.h.

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

Definition at line 309 of file encodedstream.h.


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


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46