include/boost/url/impl/segments_encoded_view.hpp

100.0% Lines (16/16) 100.0% List of functions (5/5)
segments_encoded_view.hpp
f(x) Functions (5)
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_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 2x segments_encoded_view::
21 segments_encoded_view() noexcept = default;
22
23 inline
24 1108x segments_encoded_view::
25 segments_encoded_view(
26 1108x detail::path_ref const& ref) noexcept
27 1108x : segments_encoded_base(ref)
28 {
29 1108x }
30
31 inline
32 106x segments_encoded_view::
33 segments_encoded_view(
34 106x core::string_view s)
35 : segments_encoded_view(
36 106x parse_path(s).value(
37 6x BOOST_URL_POS))
38 {
39 100x }
40
41 inline
42 3x segments_encoded_view::
43 3x segments_encoded_view(iterator first, iterator last) noexcept
44 3x : segments_encoded_base(detail::make_subref(first, last))
45 {
46 3x }
47
48 inline
49 57x segments_encoded_view::
50 operator
51 segments_view() const noexcept
52 {
53 57x return { ref_ };
54 }
55
56 } // urls
57 } // boost
58
59 #endif
60