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 54 of file istreamwrapper.h.

Member Typedef Documentation

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

Definition at line 56 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 62 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 80 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 105 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 93 of file istreamwrapper.h.

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

Definition at line 116 of file istreamwrapper.h.

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

Definition at line 104 of file istreamwrapper.h.

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

Definition at line 106 of file istreamwrapper.h.

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

Definition at line 110 of file istreamwrapper.h.

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

Definition at line 125 of file istreamwrapper.h.

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

Definition at line 94 of file istreamwrapper.h.

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

Definition at line 99 of file istreamwrapper.h.

Member Data Documentation

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

Definition at line 143 of file istreamwrapper.h.

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

Definition at line 145 of file istreamwrapper.h.

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

Definition at line 144 of file istreamwrapper.h.

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

Number of characters read.

Definition at line 148 of file istreamwrapper.h.

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

Definition at line 146 of file istreamwrapper.h.

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

Definition at line 149 of file istreamwrapper.h.

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

Definition at line 143 of file istreamwrapper.h.

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

Definition at line 147 of file istreamwrapper.h.

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

Definition at line 142 of file istreamwrapper.h.


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


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46