Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
BasicIStreamWrapper< StreamType > Class Template Reference

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

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/istreamwrapper.h>

Collaboration diagram for BasicIStreamWrapper< StreamType >:

Public Types

typedef StreamType::char_type Ch

Public Member Functions

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

Private Member Functions

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

Private Attributes

StreamType & stream_
Ch peekBuffer_ [4]
Ch * buffer_
size_t bufferSize_
Ch * bufferLast_
Ch * current_
size_t readCount_
size_t count_
 Number of characters read.
bool eof_

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:

  • std::istringstream
  • std::stringstream
  • std::wistringstream
  • std::wstringstream
  • std::ifstream
  • std::fstream
  • std::wifstream
  • std::wfstream
Template Parameters
StreamTypeClass derived from std::basic_istream.

Definition at line 50 of file istreamwrapper.h.

Member Typedef Documentation

◆ Ch

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

Definition at line 52 of file istreamwrapper.h.

Constructor & Destructor Documentation

◆ BasicIStreamWrapper() [1/2]

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

Constructor.

Parameters
streamstream opened for read.

Definition at line 58 of file istreamwrapper.h.

◆ BasicIStreamWrapper() [2/2]

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

Member Function Documentation

◆ Flush()

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

Definition at line 79 of file istreamwrapper.h.

◆ Peek()

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

Definition at line 73 of file istreamwrapper.h.

◆ Peek4()

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

Definition at line 84 of file istreamwrapper.h.

◆ Put()

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

Definition at line 78 of file istreamwrapper.h.

◆ PutBegin()

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

Definition at line 80 of file istreamwrapper.h.

◆ PutEnd()

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

Definition at line 81 of file istreamwrapper.h.

◆ Read()

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

Definition at line 93 of file istreamwrapper.h.

◆ Take()

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

Definition at line 74 of file istreamwrapper.h.

◆ Tell()

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

Definition at line 75 of file istreamwrapper.h.

Member Data Documentation

◆ buffer_

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

Definition at line 111 of file istreamwrapper.h.

◆ bufferLast_

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

Definition at line 113 of file istreamwrapper.h.

◆ bufferSize_

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

Definition at line 112 of file istreamwrapper.h.

◆ count_

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

Number of characters read.

Definition at line 116 of file istreamwrapper.h.

◆ current_

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

Definition at line 114 of file istreamwrapper.h.

◆ eof_

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

Definition at line 117 of file istreamwrapper.h.

◆ peekBuffer_

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

Definition at line 111 of file istreamwrapper.h.

◆ readCount_

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

Definition at line 115 of file istreamwrapper.h.

◆ stream_

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

Definition at line 110 of file istreamwrapper.h.


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