tetengo 1.8.1
A multipurpose library set
Loading...
Searching...
No Matches
tetengo::json::reader Class Referenceabstract

A reader. More...

#include <reader.hpp>

+ Inheritance diagram for tetengo::json::reader:
+ Collaboration diagram for tetengo::json::reader:

Public Member Functions

virtual ~reader ()
 Destroys the reader.
 
bool has_next () const
 Returns true when the next character exists.
 
char peek () const
 Returns the current character.
 
void next ()
 Moves to the next character.
 
const readerbase_reader () const
 Returns the base reader.
 

Detailed Description

A reader.

Member Function Documentation

◆ base_reader()

const reader & tetengo::json::reader::base_reader ( ) const

Returns the base reader.

Returns
The base reader.
Exceptions
std::logic_errorWhen this reader does not have a base reader.

◆ has_next()

bool tetengo::json::reader::has_next ( ) const

Returns true when the next character exists.

Return values
trueWhen the next character exists.
falseOtherwise.

◆ next()

void tetengo::json::reader::next ( )

Moves to the next character.

Exceptions
std::logic_errorWhen current position is beyond the termination point.

◆ peek()

char tetengo::json::reader::peek ( ) const

Returns the current character.

Returns
The current character.
Exceptions
std::logic_errorWhen current position is beyond the termination point.

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