Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
GenericInsituStringStream< Encoding > Struct Template Reference

A read-write string stream. More...

#include <stream.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 >

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

Note
implements Stream concept

Definition at line 188 of file stream.h.

Member Typedef Documentation

◆ Ch

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

Definition at line 189 of file stream.h.

Constructor & Destructor Documentation

◆ GenericInsituStringStream()

Definition at line 191 of file stream.h.

Member Function Documentation

◆ Flush()

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

Definition at line 203 of file stream.h.

203{}

◆ Peek()

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

Definition at line 194 of file stream.h.

194{ return *src_; }

◆ Pop()

template<typename Encoding >
void GenericInsituStringStream< Encoding >::Pop ( size_t count)
inline

Definition at line 206 of file stream.h.

206{ dst_ -= count; }
int * count

◆ Push()

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; }

◆ Put()

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

◆ PutBegin()

template<typename Encoding >
Ch * GenericInsituStringStream< Encoding >::PutBegin ( )
inline

Definition at line 201 of file stream.h.

201{ return dst_ = src_; }

◆ PutEnd()

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); }

◆ Take()

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

Definition at line 195 of file stream.h.

195{ return *src_++; }

◆ Tell()

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

◆ dst_

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

Definition at line 209 of file stream.h.

◆ head_

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

Definition at line 210 of file stream.h.

◆ src_

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: