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

Read-only string stream. More...

#include <fwd.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. More...
 
const Chhead_
 Original head of the string. More...
 

Detailed Description

template<typename Encoding>
struct GenericStringStream< Encoding >

Read-only string stream.

Note
implements Stream concept

Definition at line 47 of file fwd.h.

Member Typedef Documentation

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

Definition at line 155 of file stream.h.

Constructor & Destructor Documentation

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 * src_
Current read position.
Definition: stream.h:168
const Ch * head_
Original head of the string.
Definition: stream.h:169

Member Function Documentation

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
template<typename Encoding>
Ch GenericStringStream< Encoding >::Peek ( ) const
inline

Definition at line 159 of file stream.h.

159 { return *src_; }
const Ch * src_
Current read position.
Definition: stream.h:168
template<typename Encoding>
void GenericStringStream< Encoding >::Put ( Ch  )
inline

Definition at line 164 of file stream.h.

164 { RAPIDJSON_ASSERT(false); }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
template<typename Encoding>
Ch* GenericStringStream< Encoding >::PutBegin ( )
inline

Definition at line 163 of file stream.h.

163 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
template<typename Encoding>
size_t GenericStringStream< Encoding >::PutEnd ( Ch )
inline

Definition at line 166 of file stream.h.

166 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
template<typename Encoding>
Ch GenericStringStream< Encoding >::Take ( )
inline

Definition at line 160 of file stream.h.

160 { return *src_++; }
const Ch * src_
Current read position.
Definition: stream.h:168
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_); }
const Ch * src_
Current read position.
Definition: stream.h:168
const Ch * head_
Original head of the string.
Definition: stream.h:169

Member Data Documentation

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

Original head of the string.

Definition at line 169 of file stream.h.

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

Current read position.

Definition at line 168 of file stream.h.


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