tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
reader.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_JSON_READER_HPP)
8#define TETENGO_JSON_READER_HPP
9
10#include <boost/core/noncopyable.hpp>
11
12
13namespace tetengo::json
14{
18 class reader : private boost::noncopyable
19 {
20 public:
21 // constructors and destructor
22
26 virtual ~reader();
27
28
29 // functions
30
37 [[nodiscard]] bool has_next() const;
38
46 [[nodiscard]] char peek() const;
47
53 void next();
54
62 const reader& base_reader() const;
63
64
65 private:
66 // virtual functions
67
68 virtual bool has_next_impl() const = 0;
69
70 virtual char peek_impl() const = 0;
71
72 virtual void next_impl() = 0;
73
74 virtual const reader& base_reader_impl() const = 0;
75 };
76
77
78}
79
80
81#endif
A reader.
Definition reader.hpp:19
void next()
Moves to the next character.
virtual ~reader()
Destroys the reader.
bool has_next() const
Returns true when the next character exists.
char peek() const
Returns the current character.
const reader & base_reader() const
Returns the base reader.
A JSON library.