tetengo
1.9.2
A multipurpose library set
Loading...
Searching...
No Matches
stream_reader.hpp
Go to the documentation of this file.
1
6
7
#if !defined(TETENGO_JSON_STREAMREADER_HPP)
8
#define TETENGO_JSON_STREAMREADER_HPP
9
10
#include <cstddef>
// IWYU pragma: keep
11
#include <istream>
12
#include <memory>
13
14
#include <
tetengo/json/reader.hpp
>
15
16
17
namespace
tetengo::json
18
{
22
class
stream_reader
:
public
reader
23
{
24
public
:
25
// static functions
26
32
[[nodiscard]]
static
std::size_t
default_buffer_capacity
();
33
34
35
// constructors and destructor
36
45
explicit
stream_reader
(
46
std::unique_ptr<std::istream>&& p_stream,
47
std::size_t buffer_capacity =
default_buffer_capacity
());
48
52
virtual
~stream_reader
();
53
54
55
private
:
56
// types
57
58
class
impl;
59
60
61
// variables
62
63
const
std::unique_ptr<impl> m_p_impl;
64
65
66
// virtual functions
67
68
virtual
bool
has_next_impl()
const override
;
69
70
virtual
char
peek_impl()
const override
;
71
72
virtual
void
next_impl()
override
;
73
74
virtual
const
reader
& base_reader_impl()
const override
;
75
};
76
77
78
}
79
80
81
#endif
tetengo::json::reader
A reader.
Definition
reader.hpp:19
tetengo::json::stream_reader::stream_reader
stream_reader(std::unique_ptr< std::istream > &&p_stream, std::size_t buffer_capacity=default_buffer_capacity())
Creates a stream reader.
tetengo::json::stream_reader::~stream_reader
virtual ~stream_reader()
Destroys the stream reader.
tetengo::json::stream_reader::default_buffer_capacity
static std::size_t default_buffer_capacity()
Returns the default buffer capacity.
tetengo::json
A JSON library.
reader.hpp
A reader.
library
json
cpp
include
tetengo
json
stream_reader.hpp
Generated on
for tetengo by
1.16.1