include/boost/url/impl/parse.hpp
100.0% Lines (15/15)
100.0% Functions (5/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_PARSE_HPP | ||
| 12 | #define BOOST_URL_IMPL_PARSE_HPP | ||
| 13 | |||
| 14 | #include <boost/url/detail/config.hpp> | ||
| 15 | #include <boost/url/rfc/absolute_uri_rule.hpp> | ||
| 16 | #include <boost/url/rfc/relative_ref_rule.hpp> | ||
| 17 | #include <boost/url/rfc/uri_rule.hpp> | ||
| 18 | #include <boost/url/rfc/uri_reference_rule.hpp> | ||
| 19 | #include <boost/url/rfc/origin_form_rule.hpp> | ||
| 20 | |||
| 21 | namespace boost { | ||
| 22 | namespace urls { | ||
| 23 | |||
| 24 | //------------------------------------------------ | ||
| 25 | // | ||
| 26 | // parse functions | ||
| 27 | // | ||
| 28 | //------------------------------------------------ | ||
| 29 | |||
| 30 | BOOST_URL_CXX20_CONSTEXPR_OR_INLINE | ||
| 31 | system::result<url_view> | ||
| 32 | 3 | parse_absolute_uri( | |
| 33 | core::string_view s) | ||
| 34 | { | ||
| 35 | 3 | return grammar::parse( | |
| 36 | 3 | s, absolute_uri_rule); | |
| 37 | } | ||
| 38 | |||
| 39 | BOOST_URL_CXX20_CONSTEXPR_OR_INLINE | ||
| 40 | system::result<url_view> | ||
| 41 | 15 | parse_origin_form( | |
| 42 | core::string_view s) | ||
| 43 | { | ||
| 44 | 15 | return grammar::parse( | |
| 45 | 15 | s, origin_form_rule); | |
| 46 | } | ||
| 47 | |||
| 48 | BOOST_URL_CXX20_CONSTEXPR_OR_INLINE | ||
| 49 | system::result<url_view> | ||
| 50 | 158 | parse_relative_ref( | |
| 51 | core::string_view s) | ||
| 52 | { | ||
| 53 | 158 | return grammar::parse( | |
| 54 | 158 | s, relative_ref_rule); | |
| 55 | } | ||
| 56 | |||
| 57 | BOOST_URL_CXX20_CONSTEXPR_OR_INLINE | ||
| 58 | system::result<url_view> | ||
| 59 | 915 | parse_uri( | |
| 60 | core::string_view s) | ||
| 61 | { | ||
| 62 | 915 | return grammar::parse( | |
| 63 | 915 | s, uri_rule); | |
| 64 | } | ||
| 65 | |||
| 66 | BOOST_URL_CXX20_CONSTEXPR_OR_INLINE | ||
| 67 | system::result<url_view> | ||
| 68 | 2651 | parse_uri_reference( | |
| 69 | core::string_view s) | ||
| 70 | { | ||
| 71 | 2651 | return grammar::parse( | |
| 72 | 2651 | s, uri_reference_rule); | |
| 73 | } | ||
| 74 | |||
| 75 | } // urls | ||
| 76 | } // boost | ||
| 77 | |||
| 78 | #endif | ||
| 79 |