Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:26

0001 //
0002 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/url
0008 //
0009 
0010 #ifndef BOOST_URL_DETAIL_PATTERN_HPP
0011 #define BOOST_URL_DETAIL_PATTERN_HPP
0012 
0013 #include <boost/url/error_types.hpp>
0014 #include <boost/url/url_base.hpp>
0015 #include <boost/core/detail/string_view.hpp>
0016 
0017 // This file includes functions and classes
0018 // to parse uri templates or format strings
0019 
0020 namespace boost {
0021 namespace urls {
0022 namespace detail {
0023 
0024 class format_args;
0025 
0026 struct pattern
0027 {
0028     core::string_view scheme;
0029     core::string_view user;
0030     core::string_view pass;
0031     core::string_view host;
0032     core::string_view port;
0033     core::string_view path;
0034     core::string_view query;
0035     core::string_view frag;
0036 
0037     bool has_authority = false;
0038     bool has_user = false;
0039     bool has_pass = false;
0040     bool has_port = false;
0041     bool has_query = false;
0042     bool has_frag = false;
0043 
0044     BOOST_URL_DECL
0045     void
0046     apply(
0047         url_base& u,
0048         format_args const& args) const;
0049 };
0050 
0051 BOOST_URL_DECL
0052 system::result<pattern>
0053 parse_pattern(
0054     core::string_view s);
0055 
0056 } // detail
0057 } // url
0058 } // boost
0059 
0060 #endif