IN2OSM  1.0.1
GenericInsituStringStream< Encoding >

A read-write string stream. More...

#include <fwd.h>

Collaboration diagram for GenericInsituStringStream< Encoding >:
Collaboration graph

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

◆ Ch

typedef Encoding::Ch Ch

Definition at line 189 of file stream.h.

Constructor & Destructor Documentation

◆ GenericInsituStringStream()

GenericInsituStringStream ( Ch src)
inline

Definition at line 191 of file stream.h.

Member Function Documentation

◆ Flush()

void Flush ( )
inline

Definition at line 203 of file stream.h.

203 {}

◆ Peek()

Ch Peek ( )
inline

Definition at line 194 of file stream.h.

194 { return *src_; }
Here is the caller graph for this function:

◆ Pop()

void Pop ( size_t  count)
inline

Definition at line 206 of file stream.h.

206 { dst_ -= count; }

◆ Push()

Ch* Push ( size_t  count)
inline

Definition at line 205 of file stream.h.

205 { Ch* begin = dst_; dst_ += count; return begin; }

◆ Put()

void 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()

Ch* PutBegin ( )
inline

Definition at line 201 of file stream.h.

201 { return dst_ = src_; }

◆ PutEnd()

size_t PutEnd ( Ch begin)
inline

Definition at line 202 of file stream.h.

202 { return static_cast<size_t>(dst_ - begin); }

◆ Take()

Ch Take ( )
inline

Definition at line 195 of file stream.h.

195 { return *src_++; }
Here is the caller graph for this function:

◆ Tell()

size_t Tell ( )
inline

Definition at line 196 of file stream.h.

196 { return static_cast<size_t>(src_ - head_); }
Here is the caller graph for this function:

Member Data Documentation

◆ dst_

Ch* dst_

Definition at line 209 of file stream.h.

◆ head_

Ch* head_

Definition at line 210 of file stream.h.

◆ src_

Ch* src_

Definition at line 208 of file stream.h.


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