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

Output byte stream wrapper with statically bound encoding. More...

#include <encodedstream.h>

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 EncodedOutputStream (OutputByteStream &os, bool putBOM=true)
 
void Put (Ch c)
 
void Flush ()
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Private Member Functions

 RAPIDJSON_STATIC_ASSERT (sizeof(typename OutputByteStream::Ch)==1)
 
 EncodedOutputStream (const EncodedOutputStream &)
 
EncodedOutputStreamoperator= (const EncodedOutputStream &)
 

Private Attributes

OutputByteStream & os_
 

Detailed Description

template<typename Encoding, typename OutputByteStream>
class EncodedOutputStream< Encoding, OutputByteStream >

Output byte stream wrapper with 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, FileWriteStream.

Member Typedef Documentation

template<typename Encoding , typename OutputByteStream >
typedef Encoding::Ch EncodedOutputStream< Encoding, OutputByteStream >::Ch

Constructor & Destructor Documentation

template<typename Encoding , typename OutputByteStream >
EncodedOutputStream< Encoding, OutputByteStream >::EncodedOutputStream ( OutputByteStream &  os,
bool  putBOM = true 
)
inline
71  : os_(os) {
72  if (putBOM)
73  Encoding::PutBOM(os_);
74  }
OutputByteStream & os_
Definition: encodedstream.h:90
template<typename Encoding , typename OutputByteStream >
EncodedOutputStream< Encoding, OutputByteStream >::EncodedOutputStream ( const EncodedOutputStream< Encoding, OutputByteStream > &  )
private

Member Function Documentation

template<typename Encoding , typename OutputByteStream >
void EncodedOutputStream< Encoding, OutputByteStream >::Flush ( )
inline
77 { os_.Flush(); }
OutputByteStream & os_
Definition: encodedstream.h:90
template<typename Encoding , typename OutputByteStream >
EncodedOutputStream& EncodedOutputStream< Encoding, OutputByteStream >::operator= ( const EncodedOutputStream< Encoding, OutputByteStream > &  )
private
template<typename Encoding , typename OutputByteStream >
Ch EncodedOutputStream< Encoding, OutputByteStream >::Peek ( ) const
inline
80 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename OutputByteStream >
void EncodedOutputStream< Encoding, OutputByteStream >::Put ( Ch  c)
inline
76 { Encoding::Put(os_, c); }
OutputByteStream & os_
Definition: encodedstream.h:90
template<typename Encoding , typename OutputByteStream >
Ch* EncodedOutputStream< Encoding, OutputByteStream >::PutBegin ( )
inline
83 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename OutputByteStream >
size_t EncodedOutputStream< Encoding, OutputByteStream >::PutEnd ( Ch )
inline
84 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename OutputByteStream >
EncodedOutputStream< Encoding, OutputByteStream >::RAPIDJSON_STATIC_ASSERT ( sizeof(typename OutputByteStream::Ch)  = =1)
private
template<typename Encoding , typename OutputByteStream >
Ch EncodedOutputStream< Encoding, OutputByteStream >::Take ( )
inline
81 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename Encoding , typename OutputByteStream >
size_t EncodedOutputStream< Encoding, OutputByteStream >::Tell ( ) const
inline
82 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344

Member Data Documentation

template<typename Encoding , typename OutputByteStream >
OutputByteStream& EncodedOutputStream< Encoding, OutputByteStream >::os_
private

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