TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EncodedInputStream< Encoding, InputByteStream > Class Template Reference

Input byte stream wrapper with a statically bound encoding. More...

#include <encodedstream.h>

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 EncodedInputStream (InputByteStream &is)
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
void Put (Ch)
 
void Flush ()
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Private Member Functions

 RAPIDJSON_STATIC_ASSERT (sizeof(typename InputByteStream::Ch)==1)
 
 EncodedInputStream (const EncodedInputStream &)
 
EncodedInputStreamoperator= (const EncodedInputStream &)
 

Private Attributes

InputByteStream & is_
 
Ch current_
 

Detailed Description

template<typename Encoding, typename InputByteStream>
class EncodedInputStream< Encoding, InputByteStream >

Input byte stream wrapper with a statically bound encoding.

Template Parameters
EncodingThe interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.
InputByteStreamType of input byte stream. For example, FileReadStream.

Member Typedef Documentation

template<typename Encoding , typename InputByteStream >
typedef Encoding::Ch EncodedInputStream< Encoding, InputByteStream >::Ch

Constructor & Destructor Documentation

template<typename Encoding , typename InputByteStream >
EncodedInputStream< Encoding, InputByteStream >::EncodedInputStream ( InputByteStream &  is)
inline
38  : is_(is) {
39  current_ = Encoding::TakeBOM(is_);
40  }
Ch current_
Definition: encodedstream.h:57
InputByteStream & is_
Definition: encodedstream.h:56
template<typename Encoding , typename InputByteStream >
EncodedInputStream< Encoding, InputByteStream >::EncodedInputStream ( const EncodedInputStream< Encoding, InputByteStream > &  )
private

Member Function Documentation

template<typename Encoding , typename InputByteStream >
void EncodedInputStream< Encoding, InputByteStream >::Flush ( )
inline
48 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename InputByteStream >
EncodedInputStream& EncodedInputStream< Encoding, InputByteStream >::operator= ( const EncodedInputStream< Encoding, InputByteStream > &  )
private
template<typename Encoding , typename InputByteStream >
Ch EncodedInputStream< Encoding, InputByteStream >::Peek ( ) const
inline
42 { return current_; }
Ch current_
Definition: encodedstream.h:57
template<typename Encoding , typename InputByteStream >
void EncodedInputStream< Encoding, InputByteStream >::Put ( Ch  )
inline
47 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename InputByteStream >
Ch* EncodedInputStream< Encoding, InputByteStream >::PutBegin ( )
inline
49 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename InputByteStream >
size_t EncodedInputStream< Encoding, InputByteStream >::PutEnd ( Ch )
inline
50 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename InputByteStream >
EncodedInputStream< Encoding, InputByteStream >::RAPIDJSON_STATIC_ASSERT ( sizeof(typename InputByteStream::Ch)  = =1)
private
template<typename Encoding , typename InputByteStream >
Ch EncodedInputStream< Encoding, InputByteStream >::Take ( )
inline
43 { Ch c = current_; current_ = Encoding::Take(is_); return c; }
Encoding::Ch Ch
Definition: encodedstream.h:36
Ch current_
Definition: encodedstream.h:57
InputByteStream & is_
Definition: encodedstream.h:56
template<typename Encoding , typename InputByteStream >
size_t EncodedInputStream< Encoding, InputByteStream >::Tell ( ) const
inline
44 { return is_.Tell(); }
InputByteStream & is_
Definition: encodedstream.h:56

Member Data Documentation

template<typename Encoding , typename InputByteStream >
Ch EncodedInputStream< Encoding, InputByteStream >::current_
private
template<typename Encoding , typename InputByteStream >
InputByteStream& EncodedInputStream< Encoding, InputByteStream >::is_
private

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