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.
44  : is_(&is) {
45  }
std::istream * is_
Definition: genericstream.h:68

Member Function Documentation

◆ Flush()

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

References RAPIDJSON_ASSERT.

◆ Peek()

Ch rapidjson::GenericReadStream::Peek ( ) const
inline
48  {
49  if(is_->eof()) return '\0';
50  return static_cast<char>(is_->peek());
51  }

References is_.

◆ Put()

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

References RAPIDJSON_ASSERT.

◆ PutBegin()

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

References RAPIDJSON_ASSERT.

◆ PutEnd()

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

References RAPIDJSON_ASSERT.

◆ Take()

Ch rapidjson::GenericReadStream::Take ( )
inline
53  {
54  if(is_->eof()) return '\0';
55  return static_cast<char>(is_->get());
56  }

References is_.

◆ Tell()

size_t rapidjson::GenericReadStream::Tell ( ) const
inline
58  {
59  return (int)is_->tellg();
60  }

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: