1  
//
1  
//
2  
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
2  
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3  
// Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
3  
// Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4  
//
4  
//
5  
// Distributed under the Boost Software License, Version 1.0. (See accompanying
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)
6  
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  
//
7  
//
8  
// Official repository: https://github.com/CPPAlliance/url
8  
// Official repository: https://github.com/CPPAlliance/url
9  
//
9  
//
10  

10  

11  

11  

12  
#include <boost/url/detail/config.hpp>
12  
#include <boost/url/detail/config.hpp>
13  
#include <boost/url/params_view.hpp>
13  
#include <boost/url/params_view.hpp>
14  
#include <boost/url/parse_query.hpp>
14  
#include <boost/url/parse_query.hpp>
15  

15  

16  
namespace boost {
16  
namespace boost {
17  
namespace urls {
17  
namespace urls {
18  

18  

19  
params_view::
19  
params_view::
20  
params_view(
20  
params_view(
21  
    detail::query_ref const& ref,
21  
    detail::query_ref const& ref,
22  
    encoding_opts opt) noexcept
22  
    encoding_opts opt) noexcept
23  
    : params_base(ref, opt)
23  
    : params_base(ref, opt)
24  
{
24  
{
25  
}
25  
}
26  

26  

27  
//------------------------------------------------
27  
//------------------------------------------------
28  

28  

29  
params_view::
29  
params_view::
30  
params_view(
30  
params_view(
31  
    params_view const& other,
31  
    params_view const& other,
32  
    encoding_opts opt) noexcept
32  
    encoding_opts opt) noexcept
33  
    : params_base(other.ref_, opt)
33  
    : params_base(other.ref_, opt)
34  
{
34  
{
35  
}
35  
}
36  

36  

37  
params_view::
37  
params_view::
38  
params_view(
38  
params_view(
39  
    core::string_view s)
39  
    core::string_view s)
40  
    : params_view(
40  
    : params_view(
41  
        parse_query(s).value(
41  
        parse_query(s).value(
42  
            BOOST_URL_POS),
42  
            BOOST_URL_POS),
43  
        {true, false, false})
43  
        {true, false, false})
44  
{
44  
{
45  
}
45  
}
46  

46  

47  
params_view::
47  
params_view::
48  
params_view(
48  
params_view(
49  
    core::string_view s,
49  
    core::string_view s,
50  
    encoding_opts opt)
50  
    encoding_opts opt)
51  
    : params_view(
51  
    : params_view(
52  
        parse_query(s).value(
52  
        parse_query(s).value(
53  
            BOOST_URL_POS),
53  
            BOOST_URL_POS),
54  
        opt)
54  
        opt)
55  
{
55  
{
56  
}
56  
}
57  

57  

58  
} // urls
58  
} // urls
59  
} // boost
59  
} // boost
60  

60