TLA Line data 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_SEGMENTS_ENCODED_VIEW_HPP
12 : #define BOOST_URL_IMPL_SEGMENTS_ENCODED_VIEW_HPP
13 :
14 : #include <boost/url/detail/segments_range.hpp>
15 :
16 : namespace boost {
17 : namespace urls {
18 :
19 : inline
20 HIT 1 : segments_encoded_view::
21 : segments_encoded_view() noexcept = default;
22 :
23 : inline
24 899 : segments_encoded_view::
25 : segments_encoded_view(
26 899 : detail::path_ref const& ref) noexcept
27 899 : : segments_encoded_base(ref)
28 : {
29 899 : }
30 :
31 : inline
32 106 : segments_encoded_view::
33 : segments_encoded_view(
34 106 : core::string_view s)
35 : : segments_encoded_view(
36 106 : parse_path(s).value(
37 6 : BOOST_URL_POS))
38 : {
39 100 : }
40 :
41 : inline
42 3 : segments_encoded_view::
43 3 : segments_encoded_view(iterator first, iterator last) noexcept
44 3 : : segments_encoded_base(detail::make_subref(first, last))
45 : {
46 3 : }
47 :
48 : inline
49 56 : segments_encoded_view::
50 : operator
51 : segments_view() const noexcept
52 : {
53 56 : return { ref_ };
54 : }
55 :
56 : } // urls
57 : } // boost
58 :
59 : #endif
|