Coverage Report

Created: 2026-02-07 06:45

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
22.1k
    : st(std::forward<Args>(args)...)
24
22.1k
{
25
22.1k
}
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
13.4k
    : st(std::forward<Args>(args)...)
24
13.4k
{
25
13.4k
}
boost::json::detail::handler::handler<boost::json::storage_ptr, decltype(nullptr), int>(boost::json::storage_ptr&&, decltype(nullptr)&&, int&&)
Line
Count
Source
23
8.63k
    : st(std::forward<Args>(args)...)
24
8.63k
{
25
8.63k
}
26
27
bool
28
handler::
29
on_document_begin(
30
    system::error_code&)
31
22.1k
{
32
22.1k
    return true;
33
22.1k
}
34
35
bool
36
handler::
37
on_document_end(
38
    system::error_code&)
39
11.3k
{
40
11.3k
    return true;
41
11.3k
}
42
43
bool
44
handler::
45
on_object_begin(
46
    system::error_code&)
47
23.5k
{
48
23.5k
    return true;
49
23.5k
}
50
51
bool
52
handler::
53
on_object_end(
54
    std::size_t n,
55
    system::error_code&)
56
19.8k
{
57
19.8k
    st.push_object(n);
58
19.8k
    return true;
59
19.8k
}
60
61
bool
62
handler::
63
on_array_begin(
64
    system::error_code&)
65
35.9k
{
66
35.9k
    return true;
67
35.9k
}
68
69
bool
70
handler::
71
on_array_end(
72
    std::size_t n,
73
    system::error_code&)
74
28.6k
{
75
28.6k
    st.push_array(n);
76
28.6k
    return true;
77
28.6k
}
78
79
bool
80
handler::
81
on_key_part(
82
    string_view s,
83
    std::size_t,
84
    system::error_code&)
85
24.3k
{
86
24.3k
    st.push_chars(s);
87
24.3k
    return true;
88
24.3k
}
89
90
bool
91
handler::
92
on_key(
93
    string_view s,
94
    std::size_t,
95
    system::error_code&)
96
1.73M
{
97
1.73M
    st.push_key(s);
98
1.73M
    return true;
99
1.73M
}
100
101
bool
102
handler::
103
on_string_part(
104
    string_view s,
105
    std::size_t,
106
    system::error_code&)
107
136k
{
108
136k
    st.push_chars(s);
109
136k
    return true;
110
136k
}
111
112
bool
113
handler::
114
on_string(
115
    string_view s,
116
    std::size_t,
117
    system::error_code&)
118
38.3k
{
119
38.3k
    st.push_string(s);
120
38.3k
    return true;
121
38.3k
}
122
123
bool
124
handler::
125
on_number_part(
126
    string_view,
127
    system::error_code&)
128
6.79k
{
129
6.79k
    return true;
130
6.79k
}
131
132
bool
133
handler::
134
on_int64(
135
    std::int64_t i,
136
    string_view,
137
    system::error_code&)
138
7.02M
{
139
7.02M
    st.push_int64(i);
140
7.02M
    return true;
141
7.02M
}
142
143
bool
144
handler::
145
on_uint64(
146
    std::uint64_t u,
147
    string_view,
148
    system::error_code&)
149
35.4k
{
150
35.4k
    st.push_uint64(u);
151
35.4k
    return true;
152
35.4k
}
153
154
bool
155
handler::
156
on_double(
157
    double d,
158
    string_view,
159
    system::error_code&)
160
6.32M
{
161
6.32M
    st.push_double(d);
162
6.32M
    return true;
163
6.32M
}
164
165
bool
166
handler::
167
on_bool(
168
    bool b,
169
    system::error_code&)
170
40.0k
{
171
40.0k
    st.push_bool(b);
172
40.0k
    return true;
173
40.0k
}
174
175
bool
176
handler::
177
on_null(system::error_code&)
178
13.5k
{
179
13.5k
    st.push_null();
180
13.5k
    return true;
181
13.5k
}
182
183
bool
184
handler::
185
on_comment_part(
186
    string_view,
187
    system::error_code&)
188
60
{
189
60
    return true;
190
60
}
191
192
bool
193
handler::
194
on_comment(
195
    string_view, system::error_code&)
196
5.40k
{
197
5.40k
    return true;
198
5.40k
}
199
200
} // detail
201
} // namespace json
202
} // namespace boost
203
204
#endif