NCBI C++ ToolKit
Stream Class Reference

Search Toolkit Book for rapidjson::Stream

Concept for reading and writing characters. More...

#include <misc/jsonwrapp/rapidjson11/stream.h>

Detailed Description

Concept for reading and writing characters.

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

For write-only stream, only need to implement Put() and Flush().

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);
//! Flush the buffer.
void Flush();
//! End the writing operation.
//! \param begin The begin write pointer returned by PutBegin().
//! \return Number of characters written.
size_t PutEnd(Ch* begin);
}
Concept for reading and writing characters.

The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:58:33 2024 by modify_doxy.py rev. 669887