Cogs.Core
Public Types | Public Member Functions | Private Attributes | List of all members
Cogs::Core::JsonMemoryBufferStream Class Reference

Public Types

using Ch = char
 

Public Member Functions

 JsonMemoryBufferStream (Memory::MemoryBuffer &buffer)
 
char Peek () const
 Read the current character from stream without moving the read cursor.
 
char Take ()
 Read the current character from stream and moving the read cursor to next character.
 
size_t Tell ()
 
char * PutBegin ()
 Not used. See RapidJSON spec.
 
void Put (char c)
 Write a character.
 
void Flush ()
 Flush the buffer.
 
size_t PutEnd (char *begin)
 

Private Attributes

Memory::MemoryBuffermBuffer
 

Detailed Description

Definition at line 8 of file JsonMemoryBufferStream.h.

Member Typedef Documentation

◆ Ch

using Cogs::Core::JsonMemoryBufferStream::Ch = char

Definition at line 10 of file JsonMemoryBufferStream.h.

Constructor & Destructor Documentation

◆ JsonMemoryBufferStream()

Cogs::Core::JsonMemoryBufferStream::JsonMemoryBufferStream ( Memory::MemoryBuffer buffer)
inline

Definition at line 12 of file JsonMemoryBufferStream.h.

Member Function Documentation

◆ Flush()

void Cogs::Core::JsonMemoryBufferStream::Flush ( )
inline

Flush the buffer.

Definition at line 31 of file JsonMemoryBufferStream.h.

◆ Peek()

char Cogs::Core::JsonMemoryBufferStream::Peek ( ) const
inline

Read the current character from stream without moving the read cursor.

Definition at line 15 of file JsonMemoryBufferStream.h.

◆ Put()

void Cogs::Core::JsonMemoryBufferStream::Put ( char  c)
inline

Write a character.

Definition at line 28 of file JsonMemoryBufferStream.h.

◆ PutBegin()

char * Cogs::Core::JsonMemoryBufferStream::PutBegin ( )
inline

Not used. See RapidJSON spec.

Definition at line 25 of file JsonMemoryBufferStream.h.

◆ PutEnd()

size_t Cogs::Core::JsonMemoryBufferStream::PutEnd ( char *  begin)
inline

End the writing operation.

Parameters
beginThe begin write pointer returned by PutBegin().
Returns
Number of characters written.

Definition at line 36 of file JsonMemoryBufferStream.h.

◆ Take()

char Cogs::Core::JsonMemoryBufferStream::Take ( )
inline

Read the current character from stream and moving the read cursor to next character.

Definition at line 18 of file JsonMemoryBufferStream.h.

◆ Tell()

size_t Cogs::Core::JsonMemoryBufferStream::Tell ( )
inline

Get the current read cursor.

Returns
Number of characters read from start.

Definition at line 22 of file JsonMemoryBufferStream.h.

Member Data Documentation

◆ mBuffer

Memory::MemoryBuffer& Cogs::Core::JsonMemoryBufferStream::mBuffer
private

Definition at line 39 of file JsonMemoryBufferStream.h.


The documentation for this class was generated from the following file: