LCOV - code coverage report
Current view: top level - boost/url/detail/params_iter_impl.hpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 8 8
Test Date: 2024-07-10 02:48:26 Functions: 100.0 % 3 3

            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/url
       8              : //
       9              : 
      10              : #ifndef BOOST_URL_DETAIL_PARAMS_ITER_IMPL_HPP
      11              : #define BOOST_URL_DETAIL_PARAMS_ITER_IMPL_HPP
      12              : 
      13              : #include <boost/url/param.hpp>
      14              : #include <boost/url/detail/parts_base.hpp>
      15              : #include <boost/url/detail/url_impl.hpp>
      16              : #include <boost/assert.hpp>
      17              : 
      18              : namespace boost {
      19              : namespace urls {
      20              : namespace detail {
      21              : 
      22              : struct BOOST_URL_DECL params_iter_impl
      23              :     : parts_base
      24              : {
      25              :     query_ref ref;
      26              :     std::size_t index = 0;
      27              :     std::size_t pos;
      28              :     std::size_t nk;
      29              :     std::size_t nv;
      30              :     std::size_t dk;
      31              :     std::size_t dv;
      32              : 
      33            8 :     params_iter_impl() = default;
      34              :     params_iter_impl(
      35              :         params_iter_impl const&) = default;
      36              :     params_iter_impl& operator=(
      37              :         params_iter_impl const&) = default;
      38              : 
      39              :     // begin
      40              :     params_iter_impl(
      41              :         query_ref const&) noexcept;
      42              : 
      43              :     // end
      44              :     params_iter_impl(
      45              :         query_ref const&,
      46              :         int) noexcept;
      47              : 
      48              :     // at index
      49              :     params_iter_impl(
      50              :         query_ref const&,
      51              :         std::size_t,
      52              :         std::size_t) noexcept;
      53              :     void setup() noexcept;
      54              :     void increment() noexcept;
      55              :     void decrement() noexcept;
      56              :     param_pct_view
      57              :         dereference() const noexcept;
      58              :     pct_string_view key() const noexcept;
      59              : 
      60              :     auto
      61           17 :     next() const noexcept ->
      62              :         params_iter_impl
      63              :     {
      64           17 :         auto next = *this;
      65           17 :         next.increment();
      66           17 :         return next;
      67              :     }
      68              : 
      69              :     bool
      70         2447 :     equal(
      71              :         params_iter_impl const&
      72              :             other) const noexcept
      73              :     {
      74              :         // different containers
      75         2447 :         BOOST_ASSERT(ref.alias_of(other.ref));
      76         2447 :         return index == other.index;
      77              :     }
      78              : };
      79              : 
      80              : } // detail
      81              : } // urls
      82              : } // boost
      83              : 
      84              : #endif
        

Generated by: LCOV version 2.1