tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
reader_iterator.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_JSON_READERITERATOR_HPP)
8#define TETENGO_JSON_READERITERATOR_HPP
9
10#include <cstddef>
11#include <iterator>
12
13#include <boost/stl_interfaces/iterator_interface.hpp>
14
15
16namespace tetengo::json
17{
18 class reader;
19
20
25 public boost::stl_interfaces::iterator_interface<reader_iterator, std::input_iterator_tag, char, char>
26 {
27 public:
28 // constructors and destructor
29
36
42 explicit reader_iterator(reader& reader_);
43
44
45 // functions
46
52 [[nodiscard]] char operator*() const;
53
59 [[nodiscard]] char operator*();
60
70 friend bool operator==(const reader_iterator& one, const reader_iterator& another);
71
78
85
86
87 private:
88 // variables
89
90 reader* m_p_reader;
91
92 std::size_t m_increment_count;
93 };
94
95
96}
97
98
99#endif
A reader iterator.
Definition reader_iterator.hpp:26
reader_iterator operator++(int)
Postincrements the iterator.
char operator*() const
Dereferences the iterator.
friend bool operator==(const reader_iterator &one, const reader_iterator &another)
Returns true when one iterator is equal to another.
reader_iterator(reader &reader_)
Creates an iterator.
reader_iterator()
Creates an iterator.
char operator*()
Dereferences the iterator.
reader_iterator & operator++()
Increments the iterator.
A reader.
Definition reader.hpp:19
A JSON library.