rapidjson::GenericReadStream Class Reference

Wrapper of std::istream for input. More...

#include <genericstream.h>

Public Types

typedef char Ch
 Character type (byte). More...
 

Public Member Functions

 GenericReadStream (std::istream &is)
 Constructor. More...
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
void Put (Ch)
 
void Flush ()
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Public Attributes

std::istream * is_
 

Detailed Description

Wrapper of std::istream for input.

Member Typedef Documentation

◆ Ch

Character type (byte).

Constructor & Destructor Documentation

◆ GenericReadStream()

rapidjson::GenericReadStream::GenericReadStream ( std::istream &  is)
inline

Constructor.

Parameters
isInput stream.
19  : is_(&is) {
20  }
std::istream * is_
Definition: genericstream.h:43

Member Function Documentation

◆ Flush()

void rapidjson::GenericReadStream::Flush ( )
inline
39 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:80

References RAPIDJSON_ASSERT.

◆ Peek()

Ch rapidjson::GenericReadStream::Peek ( ) const
inline
23  {
24  if(is_->eof()) return '\0';
25  return static_cast<char>(is_->peek());
26  }

References is_.

◆ Put()

void rapidjson::GenericReadStream::Put ( Ch  )
inline
38 { RAPIDJSON_ASSERT(false); }

References RAPIDJSON_ASSERT.

◆ PutBegin()

Ch* rapidjson::GenericReadStream::PutBegin ( )
inline
40 { RAPIDJSON_ASSERT(false); return 0; }

References RAPIDJSON_ASSERT.

◆ PutEnd()

size_t rapidjson::GenericReadStream::PutEnd ( Ch )
inline
41 { RAPIDJSON_ASSERT(false); return 0; }

References RAPIDJSON_ASSERT.

◆ Take()

Ch rapidjson::GenericReadStream::Take ( )
inline
28  {
29  if(is_->eof()) return '\0';
30  return static_cast<char>(is_->get());
31  }

References is_.

◆ Tell()

size_t rapidjson::GenericReadStream::Tell ( ) const
inline
33  {
34  return (int)is_->tellg();
35  }

References is_.

Member Data Documentation

◆ is_

std::istream* rapidjson::GenericReadStream::is_

Referenced by Peek(), Take(), and Tell().


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