include/boost/url/impl/params_view.hpp

95.0% Lines (19/20) 100.0% Functions (4/4)
include/boost/url/impl/params_view.hpp
Line TLA Hits Source Code
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // Official repository: https://github.com/boostorg/url
9 //
10
11 #ifndef BOOST_URL_IMPL_PARAMS_VIEW_HPP
12 #define BOOST_URL_IMPL_PARAMS_VIEW_HPP
13
14 namespace boost {
15 namespace urls {
16
17 inline
18 205 params_view::
19 params_view(
20 detail::query_ref const& ref,
21 205 encoding_opts opt) noexcept
22 205 : params_base(ref, opt)
23 {
24 205 }
25
26 //------------------------------------------------
27
28 inline
29 6 params_view::
30 params_view(
31 params_view const& other,
32 6 encoding_opts opt) noexcept
33 6 : params_base(other.ref_, opt)
34 {
35 6 }
36
37 inline
38 11 params_view::
39 params_view(
40 11 core::string_view s)
41 : params_view(
42 17 parse_query(s).value(
43 6 BOOST_URL_POS),
44 22 {true, false, false})
45 {
46 5 }
47
48 inline
49 1 params_view::
50 params_view(
51 core::string_view s,
52 1 encoding_opts opt)
53 : params_view(
54 1 parse_query(s).value(
55 BOOST_URL_POS),
56 1 opt)
57 {
58 1 }
59
60 } // urls
61 } // boost
62
63 #endif
64