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

Read-only string stream. More...

#include <stream.h>

Public Types

typedef Encoding::Ch Ch
 

Public Member Functions

 GenericStringStream (const Ch *src)
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
ChPutBegin ()
 
void Put (Ch)
 
void Flush ()
 
size_t PutEnd (Ch *)
 

Public Attributes

const Chsrc_
 Current read position.
 
const Chhead_
 Original head of the string.
 

Detailed Description

template<typename Encoding>
struct GenericStringStream< Encoding >
Note
implements Stream concept

Definition at line 154 of file stream.h.

Member Typedef Documentation

◆ Ch

template<typename Encoding >
Encoding::Ch GenericStringStream< Encoding >::Ch

Definition at line 155 of file stream.h.

Constructor & Destructor Documentation

◆ GenericStringStream()

template<typename Encoding >
GenericStringStream< Encoding >::GenericStringStream ( const Ch * src)
inline

Definition at line 157 of file stream.h.

157: src_(src), head_(src) {}
const Ch * head_
Original head of the string.
Definition stream.h:169
const Ch * src_
Current read position.
Definition stream.h:168

Member Function Documentation

◆ Flush()

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

Definition at line 165 of file stream.h.

165{ RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition rapidjson.h:406

◆ Peek()

template<typename Encoding >
Ch GenericStringStream< Encoding >::Peek ( ) const
inline

Definition at line 159 of file stream.h.

159{ return *src_; }

◆ Put()

template<typename Encoding >
void GenericStringStream< Encoding >::Put ( Ch )
inline

Definition at line 164 of file stream.h.

164{ RAPIDJSON_ASSERT(false); }

◆ PutBegin()

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

Definition at line 163 of file stream.h.

163{ RAPIDJSON_ASSERT(false); return 0; }

◆ PutEnd()

template<typename Encoding >
size_t GenericStringStream< Encoding >::PutEnd ( Ch * )
inline

Definition at line 166 of file stream.h.

166{ RAPIDJSON_ASSERT(false); return 0; }

◆ Take()

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

Definition at line 160 of file stream.h.

160{ return *src_++; }

◆ Tell()

template<typename Encoding >
size_t GenericStringStream< Encoding >::Tell ( ) const
inline

Definition at line 161 of file stream.h.

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

Member Data Documentation

◆ head_

template<typename Encoding >
const Ch* GenericStringStream< Encoding >::head_

Definition at line 169 of file stream.h.

◆ src_

template<typename Encoding >
const Ch* GenericStringStream< Encoding >::src_

Definition at line 168 of file stream.h.


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