Coverage Report

Created: 2026-08-13 07:07

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/boost/boost/json/detail/impl/handler.ipp
Line
Count
Source
1
//
2
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3
//
4
// Distributed under the Boost Software License, Version 1.0. (See accompanying
5
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
//
7
// Official repository: https://github.com/boostorg/json
8
//
9
10
#ifndef BOOST_JSON_DETAIL_IMPL_HANDLER_HPP
11
#define BOOST_JSON_DETAIL_IMPL_HANDLER_HPP
12
13
#include <boost/json/detail/handler.hpp>
14
#include <utility>
15
16
namespace boost {
17
namespace json {
18
namespace detail {
19
20
template<class... Args>
21
handler::
22
handler(Args&&... args)
23
20.8k
    : st(std::forward<Args>(args)...)
24
20.8k
{
25
20.8k
}
boost::json::detail::handler::handler<boost::json::storage_ptr, unsigned char*&, unsigned long&>(boost::json::storage_ptr&&, unsigned char*&, unsigned long&)
Line
Count
Source
23
12.9k
    : st(std::forward<Args>(args)...)
24
12.9k
{
25
12.9k
}
boost::json::detail::handler::handler<boost::json::storage_ptr, decltype(nullptr), int>(boost::json::storage_ptr&&, decltype(nullptr)&&, int&&)
Line
Count
Source
23
7.86k
    : st(std::forward<Args>(args)...)
24
7.86k
{
25
7.86k
}
26
27
bool
28
handler::
29
on_document_begin(
30
    system::error_code&)
31
20.8k
{
32
20.8k
    return true;
33
20.8k
}
34
35
bool
36
handler::
37
on_document_end(
38
    system::error_code&)
39
10.2k
{
40
10.2k
    return true;
41
10.2k
}
42
43
bool
44
handler::
45
on_object_begin(
46
    system::error_code&)
47
36.0k
{
48
36.0k
    return true;
49
36.0k
}
50
51
bool
52
handler::
53
on_object_end(
54
    std::size_t n,
55
    system::error_code&)
56
32.4k
{
57
32.4k
    st.push_object(n);
58
32.4k
    return true;
59
32.4k
}
60
61
bool
62
handler::
63
on_array_begin(
64
    system::error_code&)
65
32.1k
{
66
32.1k
    return true;
67
32.1k
}
68
69
bool
70
handler::
71
on_array_end(
72
    std::size_t n,
73
    system::error_code&)
74
24.8k
{
75
24.8k
    st.push_array(n);
76
24.8k
    return true;
77
24.8k
}
78
79
bool
80
handler::
81
on_key_part(
82
    string_view s,
83
    std::size_t,
84
    system::error_code&)
85
80.4k
{
86
80.4k
    st.push_chars(s);
87
80.4k
    return true;
88
80.4k
}
89
90
bool
91
handler::
92
on_key(
93
    string_view s,
94
    std::size_t,
95
    system::error_code&)
96
1.87M
{
97
1.87M
    st.push_key(s);
98
1.87M
    return true;
99
1.87M
}
100
101
bool
102
handler::
103
on_string_part(
104
    string_view s,
105
    std::size_t,
106
    system::error_code&)
107
109k
{
108
109k
    st.push_chars(s);
109
109k
    return true;
110
109k
}
111
112
bool
113
handler::
114
on_string(
115
    string_view s,
116
    std::size_t,
117
    system::error_code&)
118
41.2k
{
119
41.2k
    st.push_string(s);
120
41.2k
    return true;
121
41.2k
}
122
123
bool
124
handler::
125
on_number_part(
126
    string_view,
127
    system::error_code&)
128
5.81k
{
129
5.81k
    return true;
130
5.81k
}
131
132
bool
133
handler::
134
on_int64(
135
    std::int64_t i,
136
    string_view,
137
    system::error_code&)
138
5.97M
{
139
5.97M
    st.push_int64(i);
140
5.97M
    return true;
141
5.97M
}
142
143
bool
144
handler::
145
on_uint64(
146
    std::uint64_t u,
147
    string_view,
148
    system::error_code&)
149
80.5k
{
150
80.5k
    st.push_uint64(u);
151
80.5k
    return true;
152
80.5k
}
153
154
bool
155
handler::
156
on_double(
157
    double d,
158
    string_view,
159
    system::error_code&)
160
3.86M
{
161
3.86M
    st.push_double(d);
162
3.86M
    return true;
163
3.86M
}
164
165
bool
166
handler::
167
on_bool(
168
    bool b,
169
    system::error_code&)
170
50.4k
{
171
50.4k
    st.push_bool(b);
172
50.4k
    return true;
173
50.4k
}
174
175
bool
176
handler::
177
on_null(system::error_code&)
178
39.2k
{
179
39.2k
    st.push_null();
180
39.2k
    return true;
181
39.2k
}
182
183
bool
184
handler::
185
on_comment_part(
186
    string_view,
187
    system::error_code&)
188
87
{
189
87
    return true;
190
87
}
191
192
bool
193
handler::
194
on_comment(
195
    string_view, system::error_code&)
196
8.83k
{
197
8.83k
    return true;
198
8.83k
}
199
200
} // detail
201
} // namespace json
202
} // namespace boost
203
204
#endif