Public Types | Public Member Functions | Public Attributes | List of all members
GenericInsituStringStream< Encoding > Struct Template Reference

A read-write string stream. More...

#include <fwd.h>

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 GenericInsituStringStream (Ch *src)
 
Ch Peek ()
 
Ch Take ()
 
size_t Tell ()
 
void Put (Ch c)
 
ChPutBegin ()
 
size_t PutEnd (Ch *begin)
 
void Flush ()
 
ChPush (size_t count)
 
void Pop (size_t count)
 

Public Attributes

Chsrc_
 
Chdst_
 
Chhead_
 

Detailed Description

template<typename Encoding>
struct GenericInsituStringStream< Encoding >

A read-write string stream.

This string stream is particularly designed for in-situ parsing.

Note
implements Stream concept

Definition at line 52 of file fwd.h.

Member Typedef Documentation

template<typename Encoding>
typedef Encoding::Ch GenericInsituStringStream< Encoding >::Ch

Definition at line 189 of file stream.h.

Constructor & Destructor Documentation

template<typename Encoding>
GenericInsituStringStream< Encoding >::GenericInsituStringStream ( Ch src)
inline

Definition at line 191 of file stream.h.

Member Function Documentation

template<typename Encoding>
void GenericInsituStringStream< Encoding >::Flush ( )
inline

Definition at line 203 of file stream.h.

203 {}
template<typename Encoding>
Ch GenericInsituStringStream< Encoding >::Peek ( )
inline

Definition at line 194 of file stream.h.

194 { return *src_; }
template<typename Encoding>
void GenericInsituStringStream< Encoding >::Pop ( size_t  count)
inline

Definition at line 206 of file stream.h.

206 { dst_ -= count; }
template<typename Encoding>
Ch* GenericInsituStringStream< Encoding >::Push ( size_t  count)
inline

Definition at line 205 of file stream.h.

205 { Ch* begin = dst_; dst_ += count; return begin; }
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
template<typename Encoding>
void GenericInsituStringStream< Encoding >::Put ( Ch  c)
inline

Definition at line 199 of file stream.h.

199 { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
template<typename Encoding>
Ch* GenericInsituStringStream< Encoding >::PutBegin ( )
inline

Definition at line 201 of file stream.h.

201 { return dst_ = src_; }
template<typename Encoding>
size_t GenericInsituStringStream< Encoding >::PutEnd ( Ch begin)
inline

Definition at line 202 of file stream.h.

202 { return static_cast<size_t>(dst_ - begin); }
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
template<typename Encoding>
Ch GenericInsituStringStream< Encoding >::Take ( )
inline

Definition at line 195 of file stream.h.

195 { return *src_++; }
template<typename Encoding>
size_t GenericInsituStringStream< Encoding >::Tell ( )
inline

Definition at line 196 of file stream.h.

196 { return static_cast<size_t>(src_ - head_); }

Member Data Documentation

template<typename Encoding>
Ch* GenericInsituStringStream< Encoding >::dst_

Definition at line 209 of file stream.h.

template<typename Encoding>
Ch* GenericInsituStringStream< Encoding >::head_

Definition at line 210 of file stream.h.

template<typename Encoding>
Ch* GenericInsituStringStream< Encoding >::src_

Definition at line 208 of file stream.h.


The documentation for this struct was generated from the following files: