LCOV - code coverage report
Current view: top level - json/detail/impl - handler.ipp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 50 50
Test Date: 2025-12-23 17:20:51 Functions: 100.0 % 20 20

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

Generated by: LCOV version 2.1