17 #ifndef RAPIDJSON_STREAM_H_ 18 #define RAPIDJSON_STREAM_H_ 72 template <
typename Stream>
87 template <
typename Stream>
95 template <
typename Stream>
96 inline void PutUnsafe(Stream& stream,
typename Stream::Ch c)
102 template <
typename Stream,
typename Ch>
103 inline void PutN(Stream& stream, Ch c,
size_t n)
106 for (
size_t i = 0; i < n; i++)
119 #if defined(_MSC_VER) && _MSC_VER <= 1800 121 RAPIDJSON_DIAG_OFF(4702)
122 RAPIDJSON_DIAG_OFF(4512)
125 template <
typename InputStream,
typename Encoding = UTF8<> >
129 typedef typename Encoding::Ch
Ch;
148 return is_.PutBegin();
160 return is_.PutEnd(ch);
172 return is_.GetType();
183 #if defined(_MSC_VER) && _MSC_VER <= 1800 193 template <
typename Encoding>
196 typedef typename Encoding::Ch
Ch;
212 return static_cast<size_t>(src_ - head_);
238 template <
typename Encoding>
257 template <
typename Encoding>
260 typedef typename Encoding::Ch
Ch;
277 return static_cast<size_t>(src_ - head_);
293 return static_cast<size_t>(dst_ - begin);
315 template <
typename Encoding>
329 #endif // RAPIDJSON_STREAM_H_ GenericStringStream< UTF8<> > StringStream
String stream with UTF8 encoding.
GenericInsituStringStream< UTF8<> > InsituStringStream
Insitu string stream with UTF8 encoding.
UTFType
Runtime-specified UTF encoding type of a stream.
#define RAPIDJSON_ASSERT(x)
Assertion.
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
GenericInsituStringStream(Ch *src)
const Ch * src_
Current read position.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
A read-write string stream.
GenericStringStream(const Ch *src)
GenericStreamWrapper(InputStream &is)
void PutUnsafe(Stream &stream, typename Stream::Ch c)
Write character to a stream, presuming buffer is reserved.
void PutReserve(Stream &stream, size_t count)
Reserve n characters for writing to a stream.
Provides additional information for stream.
void PutN(Stream &stream, Ch c, size_t n)
Put N copies of a character to a stream.
common definitions and configuration
const Ch * head_
Original head of the string.