A stream reader.
More...
#include <stream_reader.hpp>
|
| | stream_reader (std::unique_ptr< std::istream > &&p_stream, std::size_t buffer_capacity=default_buffer_capacity()) |
| | Creates a stream reader.
|
| |
|
virtual | ~stream_reader () |
| | Destroys the stream 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 reader & | base_reader () const |
| | Returns the base reader.
|
| |
◆ stream_reader()
| tetengo::json::stream_reader::stream_reader |
( |
std::unique_ptr< std::istream > && | p_stream, |
|
|
std::size_t | buffer_capacity = default_buffer_capacity() ) |
|
explicit |
Creates a stream reader.
- Parameters
-
| p_stream | A unique pointer to an input stream. |
| buffer_capacity | A buffer capacity. |
- Exceptions
-
| std::invalid_argument | When p_stream is nullptr or buffer_capacity is 0. |
◆ default_buffer_capacity()
| static std::size_t tetengo::json::stream_reader::default_buffer_capacity |
( |
| ) |
|
|
staticnodiscard |
Returns the default buffer capacity.
- Returns
- The default buffer capacity.
The documentation for this class was generated from the following file: