rapidjson
A fast JSON parser/generator for C++ with both SAX/DOM style API
 All Classes Functions Variables Typedefs Pages
rapidjson::Stream Class Reference

Concept for reading and writing characters. More...

#include <rapidjson.h>

Inheritance diagram for rapidjson::Stream:
rapidjson::FileStream rapidjson::GenericInsituStringStream< Encoding > rapidjson::GenericStringBuffer< Encoding, Allocator > rapidjson::GenericStringStream< Encoding >

Detailed Description

Concept for reading and writing characters.

    For read-only stream, no need to implement PutBegin(), Put() and PutEnd().

    For write-only stream, only need to implement Put().
concept Stream {
typename Ch; //!< Character type of the stream.
//! Read the current character from stream without moving the read cursor.
Ch Peek() const;
//! Read the current character from stream and moving the read cursor to next character.
Ch Take();
//! Get the current read cursor.
//! \return Number of characters read from start.
size_t Tell();
//! Begin writing operation at the current read pointer.
//! \return The begin writer pointer.
Ch* PutBegin();
//! Write a character.
void Put(Ch c);
//! End the writing operation.
//! \param begin The begin write pointer returned by PutBegin().
//! \return Number of characters written.
size_t PutEnd(Ch* begin);
}

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