Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BasicIStreamWrapper< StreamType > Class Template Reference

Wrapper of std::basic_istream into RapidJSON's Stream concept. More...

#include <istreamwrapper.h>

Public Types

typedef StreamType::char_type Ch
 

Public Member Functions

 BasicIStreamWrapper (StreamType &stream)
 Constructor. More...
 
 BasicIStreamWrapper (StreamType &stream, char *buffer, size_t bufferSize)
 Constructor. More...
 
void Flush ()
 
Ch Peek () const
 
const ChPeek4 () const
 
void Put (Ch)
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 
Ch Take ()
 
size_t Tell () const
 

Private Member Functions

 BasicIStreamWrapper ()
 
 BasicIStreamWrapper (const BasicIStreamWrapper &)
 
BasicIStreamWrapperoperator= (const BasicIStreamWrapper &)
 
void Read ()
 

Private Attributes

Chbuffer_
 
ChbufferLast_
 
size_t bufferSize_
 
size_t count_
 Number of characters read. More...
 
Chcurrent_
 
bool eof_
 
Ch peekBuffer_ [4]
 
size_t readCount_
 
StreamTypestream_
 

Detailed Description

template<typename StreamType>
class BasicIStreamWrapper< StreamType >

Wrapper of std::basic_istream into RapidJSON's Stream concept.

The classes can be wrapped including but not limited to:

Template Parameters
StreamTypeClass derived from std::basic_istream.

Definition at line 49 of file istreamwrapper.h.

Member Typedef Documentation

template<typename StreamType >
typedef StreamType::char_type BasicIStreamWrapper< StreamType >::Ch

Definition at line 52 of file istreamwrapper.h.

Constructor & Destructor Documentation

template<typename StreamType >
BasicIStreamWrapper< StreamType >::BasicIStreamWrapper ( StreamType stream)
inline

Constructor.

Parameters
streamstream opened for read.

Definition at line 58 of file istreamwrapper.h.

template<typename StreamType >
BasicIStreamWrapper< StreamType >::BasicIStreamWrapper ( StreamType stream,
char *  buffer,
size_t  bufferSize 
)
inline

Constructor.

Parameters
streamstream opened for read.
bufferuser-supplied buffer.
bufferSizesize of buffer in bytes. Must >=4 bytes.

Definition at line 77 of file istreamwrapper.h.

template<typename StreamType >
BasicIStreamWrapper< StreamType >::BasicIStreamWrapper ( )
private
template<typename StreamType >
BasicIStreamWrapper< StreamType >::BasicIStreamWrapper ( const BasicIStreamWrapper< StreamType > &  )
private

Member Function Documentation

template<typename StreamType >
void BasicIStreamWrapper< StreamType >::Flush ( )
inline

Definition at line 111 of file istreamwrapper.h.

template<typename StreamType >
BasicIStreamWrapper& BasicIStreamWrapper< StreamType >::operator= ( const BasicIStreamWrapper< StreamType > &  )
private
template<typename StreamType >
Ch BasicIStreamWrapper< StreamType >::Peek ( ) const
inline

Definition at line 91 of file istreamwrapper.h.

template<typename StreamType >
const Ch* BasicIStreamWrapper< StreamType >::Peek4 ( ) const
inline

Definition at line 127 of file istreamwrapper.h.

template<typename StreamType >
void BasicIStreamWrapper< StreamType >::Put ( Ch  )
inline

Definition at line 107 of file istreamwrapper.h.

template<typename StreamType >
Ch* BasicIStreamWrapper< StreamType >::PutBegin ( )
inline

Definition at line 115 of file istreamwrapper.h.

template<typename StreamType >
size_t BasicIStreamWrapper< StreamType >::PutEnd ( Ch )
inline

Definition at line 120 of file istreamwrapper.h.

template<typename StreamType >
void BasicIStreamWrapper< StreamType >::Read ( )
inlineprivate

Definition at line 137 of file istreamwrapper.h.

template<typename StreamType >
Ch BasicIStreamWrapper< StreamType >::Take ( )
inline

Definition at line 95 of file istreamwrapper.h.

template<typename StreamType >
size_t BasicIStreamWrapper< StreamType >::Tell ( ) const
inline

Definition at line 101 of file istreamwrapper.h.

Member Data Documentation

template<typename StreamType >
Ch * BasicIStreamWrapper< StreamType >::buffer_
private

Definition at line 158 of file istreamwrapper.h.

template<typename StreamType >
Ch* BasicIStreamWrapper< StreamType >::bufferLast_
private

Definition at line 160 of file istreamwrapper.h.

template<typename StreamType >
size_t BasicIStreamWrapper< StreamType >::bufferSize_
private

Definition at line 159 of file istreamwrapper.h.

template<typename StreamType >
size_t BasicIStreamWrapper< StreamType >::count_
private

Number of characters read.

Definition at line 163 of file istreamwrapper.h.

template<typename StreamType >
Ch* BasicIStreamWrapper< StreamType >::current_
private

Definition at line 161 of file istreamwrapper.h.

template<typename StreamType >
bool BasicIStreamWrapper< StreamType >::eof_
private

Definition at line 164 of file istreamwrapper.h.

template<typename StreamType >
Ch BasicIStreamWrapper< StreamType >::peekBuffer_[4]
private

Definition at line 158 of file istreamwrapper.h.

template<typename StreamType >
size_t BasicIStreamWrapper< StreamType >::readCount_
private

Definition at line 162 of file istreamwrapper.h.

template<typename StreamType >
StreamType& BasicIStreamWrapper< StreamType >::stream_
private

Definition at line 157 of file istreamwrapper.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54