IN2OSM  1.0.1
EncodedInputStream< Encoding, InputByteStream >

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

#include <encodedstream.h>

Collaboration diagram for EncodedInputStream< Encoding, InputByteStream >:
Collaboration graph

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.

Definition at line 39 of file encodedstream.h.

Member Typedef Documentation

◆ Ch

typedef Encoding::Ch Ch

Definition at line 42 of file encodedstream.h.

Constructor & Destructor Documentation

◆ EncodedInputStream() [1/2]

EncodedInputStream ( InputByteStream &  is)
inline

Definition at line 44 of file encodedstream.h.

44  : is_(is) {
45  current_ = Encoding::TakeBOM(is_);
46  }
InputByteStream & is_
Definition: encodedstream.h:62
Here is the caller graph for this function:

◆ EncodedInputStream() [2/2]

EncodedInputStream ( const EncodedInputStream< Encoding, InputByteStream > &  )
private

Member Function Documentation

◆ Flush()

void Flush ( )
inline

Definition at line 54 of file encodedstream.h.

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

◆ operator=()

EncodedInputStream& operator= ( const EncodedInputStream< Encoding, InputByteStream > &  )
private
Here is the caller graph for this function:

◆ Peek()

Ch Peek ( ) const
inline

Definition at line 48 of file encodedstream.h.

48 { return current_; }

◆ Put()

void Put ( Ch  )
inline

Definition at line 53 of file encodedstream.h.

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

◆ PutBegin()

Ch* PutBegin ( )
inline

Definition at line 55 of file encodedstream.h.

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

◆ PutEnd()

size_t PutEnd ( Ch )
inline

Definition at line 56 of file encodedstream.h.

56 { 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 InputByteStream::Ch)  = =1)
private

◆ Take()

Ch Take ( )
inline

Definition at line 49 of file encodedstream.h.

49 { Ch c = current_; current_ = Encoding::Take(is_); return c; }
Encoding::Ch Ch
Definition: encodedstream.h:42
InputByteStream & is_
Definition: encodedstream.h:62
Here is the caller graph for this function:

◆ Tell()

size_t Tell ( ) const
inline

Definition at line 50 of file encodedstream.h.

50 { return is_.Tell(); }
InputByteStream & is_
Definition: encodedstream.h:62

Member Data Documentation

◆ current_

Ch current_
private

Definition at line 63 of file encodedstream.h.

◆ is_

InputByteStream& is_
private

Definition at line 62 of file encodedstream.h.


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