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/boostorg/url
8  
// Official repository: https://github.com/boostorg/url
9  
//
9  
//
10  

10  

11  
#ifndef BOOST_URL_IMPL_PARAMS_ENCODED_VIEW_HPP
11  
#ifndef BOOST_URL_IMPL_PARAMS_ENCODED_VIEW_HPP
12  
#define BOOST_URL_IMPL_PARAMS_ENCODED_VIEW_HPP
12  
#define BOOST_URL_IMPL_PARAMS_ENCODED_VIEW_HPP
13  

13  

14  
namespace boost {
14  
namespace boost {
15  
namespace urls {
15  
namespace urls {
16  

16  

17  
inline
17  
inline
18  
params_encoded_view::
18  
params_encoded_view::
19  
params_encoded_view(
19  
params_encoded_view(
20  
    detail::query_ref const& ref) noexcept
20  
    detail::query_ref const& ref) noexcept
21  
    : params_encoded_base(ref)
21  
    : params_encoded_base(ref)
22  
{
22  
{
23  
}
23  
}
24  

24  

25  
inline
25  
inline
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  
inline
35  
inline
36  
params_encoded_view::
36  
params_encoded_view::
37  
operator
37  
operator
38  
params_view() const noexcept
38  
params_view() const noexcept
39  
{
39  
{
40  
    return { ref_, encoding_opts{ true, false, false} };
40  
    return { ref_, encoding_opts{ true, false, false} };
41  
}
41  
}
42  

42  

43  
} // urls
43  
} // urls
44  
} // boost
44  
} // boost
45  

45  

46  
#endif
46  
#endif