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_encoded_view.hpp>
13  
#include <boost/url/params_encoded_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_encoded_view::
19  
params_encoded_view::
20  
params_encoded_view(
20  
params_encoded_view(
21  
    detail::query_ref const& ref) noexcept
21  
    detail::query_ref const& ref) noexcept
22  
    : params_encoded_base(ref)
22  
    : params_encoded_base(ref)
23  
{
23  
{
24  
}
24  
}
25  

25  

26  
params_encoded_view::
26  
params_encoded_view::
27  
params_encoded_view(
27  
params_encoded_view(
28  
    core::string_view s)
28  
    core::string_view s)
29  
    : params_encoded_view(
29  
    : params_encoded_view(
30  
        parse_query(s).value(
30  
        parse_query(s).value(
31  
            BOOST_URL_POS))
31  
            BOOST_URL_POS))
32  
{
32  
{
33  
}
33  
}
34  

34  

35  
params_encoded_view::
35  
params_encoded_view::
36  
operator
36  
operator
37  
params_view() const noexcept
37  
params_view() const noexcept
38  
{
38  
{
39  
    return { ref_, encoding_opts{ true, false, false} };
39  
    return { ref_, encoding_opts{ true, false, false} };
40  
}
40  
}
41  

41  

42  
} // urls
42  
} // urls
43  
} // boost
43  
} // boost
44  

44