| Line | Branch | Exec | Source |
|---|---|---|---|
| 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 | |||
| 12 | #include <boost/url/detail/config.hpp> | ||
| 13 | #include <boost/url/detail/segments_range.hpp> | ||
| 14 | #include <boost/url/segments_encoded_view.hpp> | ||
| 15 | #include <boost/url/parse_path.hpp> | ||
| 16 | |||
| 17 | namespace boost { | ||
| 18 | namespace urls { | ||
| 19 | |||
| 20 | 867 | segments_encoded_view:: | |
| 21 | segments_encoded_view( | ||
| 22 | 867 | detail::path_ref const& ref) noexcept | |
| 23 | 867 | : segments_encoded_base(ref) | |
| 24 | { | ||
| 25 | 867 | } | |
| 26 | |||
| 27 | 106 | segments_encoded_view:: | |
| 28 | segments_encoded_view( | ||
| 29 | 106 | core::string_view s) | |
| 30 | : segments_encoded_view( | ||
| 31 |
2/2✓ Branch 3 taken 100 times.
✓ Branch 4 taken 6 times.
|
106 | parse_path(s).value( |
| 32 | 6 | BOOST_URL_POS)) | |
| 33 | { | ||
| 34 | 100 | } | |
| 35 | |||
| 36 | 3 | segments_encoded_view:: | |
| 37 | 3 | segments_encoded_view(iterator first, iterator last) noexcept | |
| 38 | 3 | : segments_encoded_base(detail::make_subref(first, last)) | |
| 39 | { | ||
| 40 | 3 | } | |
| 41 | |||
| 42 | 56 | segments_encoded_view:: | |
| 43 | operator | ||
| 44 | segments_view() const noexcept | ||
| 45 | { | ||
| 46 | 56 | return { ref_ }; | |
| 47 | } | ||
| 48 | |||
| 49 | } // urls | ||
| 50 | } // boost | ||
| 51 | |||
| 52 |