IN2OSM  1.0.1
EncodedOutputStream< Encoding, OutputByteStream >

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

#include <encodedstream.h>

Collaboration diagram for EncodedOutputStream< Encoding, OutputByteStream >:
Collaboration graph

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.
OutputByteStreamType of input byte stream. For example, FileWriteStream.

Definition at line 100 of file encodedstream.h.

Member Typedef Documentation

◆ Ch

typedef Encoding::Ch Ch

Definition at line 103 of file encodedstream.h.

Constructor & Destructor Documentation

◆ EncodedOutputStream() [1/2]

EncodedOutputStream ( OutputByteStream &  os,
bool  putBOM = true 
)
inline

Definition at line 105 of file encodedstream.h.

105  : os_(os) {
106  if (putBOM)
107  Encoding::PutBOM(os_);
108  }
OutputByteStream & os_

◆ EncodedOutputStream() [2/2]

EncodedOutputStream ( const EncodedOutputStream< Encoding, OutputByteStream > &  )
private

Member Function Documentation

◆ Flush()

void Flush ( )
inline

Definition at line 111 of file encodedstream.h.

111 { os_.Flush(); }
OutputByteStream & os_

◆ operator=()

EncodedOutputStream& operator= ( const EncodedOutputStream< Encoding, OutputByteStream > &  )
private

◆ Peek()

Ch Peek ( ) const
inline

Definition at line 114 of file encodedstream.h.

114 { RAPIDJSON_ASSERT(false); return 0;}
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ Put()

void Put ( Ch  c)
inline

Definition at line 110 of file encodedstream.h.

110 { Encoding::Put(os_, c); }
OutputByteStream & os_

◆ PutBegin()

Ch* PutBegin ( )
inline

Definition at line 117 of file encodedstream.h.

117 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ PutEnd()

size_t PutEnd ( Ch )
inline

Definition at line 118 of file encodedstream.h.

118 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
Here is the call graph for this function:

◆ RAPIDJSON_STATIC_ASSERT()

RAPIDJSON_STATIC_ASSERT ( sizeof(typename OutputByteStream::Ch)  = =1)
private

◆ Take()

Ch Take ( )
inline

Definition at line 115 of file encodedstream.h.

115 { RAPIDJSON_ASSERT(false); return 0;}
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ Tell()

size_t Tell ( ) const
inline

Definition at line 116 of file encodedstream.h.

116 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

Member Data Documentation

◆ os_

OutputByteStream& os_
private

Definition at line 124 of file encodedstream.h.


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