tetengo 1.8.1
A multipurpose library set
Loading...
Searching...
No Matches
tetengo::json::line_counting_reader Class Reference

A line counting reader. More...

#include <line_counting_reader.hpp>

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

Public Member Functions

 line_counting_reader (std::unique_ptr< reader > &&p_base_reader)
 Creates a line counting reader.
 
virtual ~line_counting_reader ()
 Destroys the line counting reader.
 
const file_locationget_location () const
 
- Public Member Functions inherited from tetengo::json::reader
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 line counting reader.

Constructor & Destructor Documentation

◆ line_counting_reader()

tetengo::json::line_counting_reader::line_counting_reader ( std::unique_ptr< reader > &&  p_base_reader)
explicit

Creates a line counting reader.

Parameters
p_base_readerA unique pointer to a base reader.
Exceptions
std::invalid_argumentWhen p_base_reader is nullptr.

Member Function Documentation

◆ get_location()

const file_location & tetengo::json::line_counting_reader::get_location ( ) const

Returns the location.

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

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