Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move detail headers to src #815

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions include/boost/url/detail/vformat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,19 @@
#define BOOST_URL_DETAIL_FORMAT_HPP

#include <boost/url/detail/format_args.hpp>
#include <boost/url/detail/pattern.hpp>
#include <boost/core/detail/string_view.hpp>
#include <boost/url/url.hpp>

namespace boost {
namespace urls {
namespace detail {

inline
BOOST_URL_DECL
void
vformat_to(
url_base& u,
core::string_view fmt,
detail::format_args args)
{
parse_pattern(fmt)
.value().apply(u, args);
}
detail::format_args args);

inline
url
Expand Down
10 changes: 5 additions & 5 deletions include/boost/url/rfc/detail/path_rules.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#ifndef BOOST_URL_RFC_DETAIL_PATH_RULES_HPP
#define BOOST_URL_RFC_DETAIL_PATH_RULES_HPP

#include <boost/url/rfc/pchars.hpp>
#include <boost/url/rfc/pct_encoded_rule.hpp>
#include <boost/url/grammar/delim_rule.hpp>
#include <boost/url/grammar/range_rule.hpp>
#include <boost/url/grammar/tuple_rule.hpp>
#include "boost/url/rfc/pchars.hpp"
#include "boost/url/rfc/pct_encoded_rule.hpp"
#include "boost/url/grammar/delim_rule.hpp"
#include "boost/url/grammar/range_rule.hpp"
#include "boost/url/grammar/tuple_rule.hpp"

namespace boost {
namespace urls {
Expand Down
2 changes: 1 addition & 1 deletion src/authority_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <boost/url/detail/config.hpp>
#include <boost/url/authority_view.hpp>
#include <boost/url/detail/normalize.hpp>
#include "detail/normalize.hpp"
#include <boost/url/grammar/parse.hpp>
#include <boost/url/rfc/authority_rule.hpp>
#include <boost/url/rfc/pct_encoded_rule.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/detail/any_params_iter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <boost/url/detail/any_params_iter.hpp>
#include <boost/url/encode.hpp>
#include <boost/core/detail/string_view.hpp>
#include <boost/url/rfc/detail/charsets.hpp>
#include "../rfc/detail/charsets.hpp"

namespace boost {
namespace urls {
Expand Down
2 changes: 1 addition & 1 deletion src/detail/any_segments_iter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_DETAIL_IMPL_ANY_SEGMENTS_ITER_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/rfc/detail/charsets.hpp>
#include "../rfc/detail/charsets.hpp"
#include <boost/url/detail/any_segments_iter.hpp>
#include <boost/core/detail/string_view.hpp>
#include <boost/url/encode.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/detail/decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_DETAIL_IMPL_DECODE_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/decode.hpp>
#include "decode.hpp"
#include <boost/url/grammar/charset.hpp>
#include <boost/url/grammar/hexdig_chars.hpp>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef BOOST_URL_DETAIL_DECODE_HPP
#define BOOST_URL_DETAIL_DECODE_HPP

#include <boost/url/encoding_opts.hpp>
#include "boost/url/encoding_opts.hpp"
#include <boost/core/detail/string_view.hpp>
#include <cstdlib>

Expand Down
2 changes: 1 addition & 1 deletion src/detail/format_args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <boost/url/detail/config.hpp>
#include <boost/url/encode.hpp>
#include <boost/url/detail/format_args.hpp>
#include <boost/url/detail/replacement_field_rule.hpp>
#include "boost/url/detail/replacement_field_rule.hpp"
#include <boost/url/grammar/delim_rule.hpp>
#include <boost/url/grammar/optional_rule.hpp>
#include <boost/url/grammar/parse.hpp>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/detail/normalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

#include <boost/url/detail/config.hpp>
#include <boost/url/decode_view.hpp>
#include <boost/url/detail/decode.hpp>
#include "decode.hpp"
#include <boost/url/segments_encoded_view.hpp>
#include <boost/url/detail/normalize.hpp>
#include <boost/url/grammar/ci_string.hpp>
#include <boost/assert.hpp>
#include <boost/core/ignore_unused.hpp>
#include <cstring>
#include "normalize.hpp"

namespace boost {
namespace urls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#define BOOST_URL_DETAIL_NORMALIZED_HPP

#include <boost/core/detail/string_view.hpp>
#include <boost/url/segments_encoded_view.hpp>
#include <boost/url/detail/normalize.hpp>
#include "boost/url/segments_encoded_view.hpp"

namespace boost {
namespace urls {
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions src/detail/pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
#define BOOST_URL_DETAIL_IMPL_PATTERN_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/pattern.hpp>
#include <boost/url/detail/pct_format.hpp>
#include <boost/url/detail/replacement_field_rule.hpp>
#include "pattern.hpp"
#include "pct_format.hpp"
#include "boost/url/detail/replacement_field_rule.hpp"
#include <boost/url/grammar/alpha_chars.hpp>
#include <boost/url/grammar/optional_rule.hpp>
#include <boost/url/grammar/token_rule.hpp>
#include <boost/url/rfc/detail/charsets.hpp>
#include <boost/url/rfc/detail/host_rule.hpp>
#include <boost/url/rfc/detail/path_rules.hpp>
#include <boost/url/rfc/detail/port_rule.hpp>
#include <boost/url/rfc/detail/scheme_rule.hpp>
#include "../rfc/detail/charsets.hpp"
#include "../rfc/detail/host_rule.hpp"
#include "boost/url/rfc/detail/path_rules.hpp"
#include "../rfc/detail/port_rule.hpp"
#include "../rfc/detail/scheme_rule.hpp"

namespace boost {
namespace urls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#ifndef BOOST_URL_DETAIL_PATTERN_HPP
#define BOOST_URL_DETAIL_PATTERN_HPP

#include <boost/url/error_types.hpp>
#include <boost/url/url_base.hpp>
#include "boost/url/error_types.hpp"
#include "boost/url/url_base.hpp"
#include <boost/core/detail/string_view.hpp>

// This file includes functions and classes
Expand Down
2 changes: 1 addition & 1 deletion src/detail/pct_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_DETAIL_IMPL_PCT_FORMAT_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/pct_format.hpp>
#include "pct_format.hpp"
#include <boost/url/grammar/parse.hpp>
#include <boost/url/grammar/unsigned_rule.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#define BOOST_URL_DETAIL_PCT_FORMAT_HPP

#include <boost/core/detail/string_view.hpp>
#include <boost/url/url.hpp>
#include <boost/url/grammar/lut_chars.hpp>
#include <boost/url/detail/format_args.hpp>
#include "boost/url/url.hpp"
#include "boost/url/grammar/lut_chars.hpp"
#include "boost/url/detail/format_args.hpp"

namespace boost {
namespace urls {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/detail/replacement_field_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_DETAIL_IMPL_REPLACEMENT_FIELD_RULE_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/replacement_field_rule.hpp>
#include "boost/url/detail/replacement_field_rule.hpp"
#include <boost/url/grammar/alnum_chars.hpp>
#include <boost/url/grammar/alpha_chars.hpp>
#include <boost/url/grammar/delim_rule.hpp>
Expand Down
4 changes: 2 additions & 2 deletions src/detail/segments_iter_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#define BOOST_URL_DETAIL_IMPL_SEGMENTS_ITER_IMPL_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/path.hpp>
#include "path.hpp"
#include <boost/url/detail/segments_iter_impl.hpp>
#include <boost/url/rfc/detail/path_rules.hpp>
#include "boost/url/rfc/detail/path_rules.hpp"
#include <boost/assert.hpp>

namespace boost {
Expand Down
2 changes: 1 addition & 1 deletion src/detail/url_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_DETAIL_IMPL_URL_IMPL_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/path.hpp>
#include "path.hpp"
#include <boost/url/detail/url_impl.hpp>
#include <boost/url/authority_view.hpp>
#include <boost/assert.hpp>
Expand Down
36 changes: 36 additions & 0 deletions src/detail/vformat.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Copyright (c) 2022 Alan de Freitas ([email protected])
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/url
//

#ifndef BOOST_URL_DETAIL_VFORMAT_IPP
#define BOOST_URL_DETAIL_VFORMAT_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/detail/vformat.hpp>
#include "pattern.hpp"

namespace boost {
namespace urls {
namespace detail {

void
vformat_to(
url_base& u,
core::string_view fmt,
detail::format_args args)
{
parse_pattern(fmt)
.value().apply(u, args);
}


} // detail
} // urls
} // boost

#endif
4 changes: 2 additions & 2 deletions src/parse_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include <boost/url/detail/config.hpp>
#include <boost/url/parse_path.hpp>
#include <boost/url/error.hpp>
#include <boost/url/detail/path.hpp>
#include "detail/path.hpp"
#include <boost/url/grammar/parse.hpp>
#include <boost/url/rfc/detail/path_rules.hpp>
#include "boost/url/rfc/detail/path_rules.hpp"

namespace boost {
namespace urls {
Expand Down
2 changes: 1 addition & 1 deletion src/pct_string_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <boost/url/detail/config.hpp>
#include <boost/url/error.hpp>
#include <boost/url/pct_string_view.hpp>
#include <boost/url/detail/decode.hpp>
#include "detail/decode.hpp"
#include <boost/url/grammar/hexdig_chars.hpp>
#include <boost/url/detail/except.hpp>

Expand Down
6 changes: 3 additions & 3 deletions src/rfc/absolute_uri_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <boost/url/grammar/tuple_rule.hpp>
#include <boost/url/grammar/optional_rule.hpp>
#include <boost/url/grammar/parse.hpp>
#include <boost/url/rfc/detail/hier_part_rule.hpp>
#include <boost/url/rfc/detail/query_part_rule.hpp>
#include <boost/url/rfc/detail/scheme_rule.hpp>
#include "detail/hier_part_rule.hpp"
#include "detail/query_part_rule.hpp"
#include "detail/scheme_rule.hpp"
#include <utility>

namespace boost {
Expand Down
6 changes: 3 additions & 3 deletions src/rfc/authority_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <boost/url/grammar/optional_rule.hpp>
#include <boost/url/grammar/parse.hpp>
#include <boost/url/grammar/tuple_rule.hpp>
#include <boost/url/rfc/detail/host_rule.hpp>
#include <boost/url/rfc/detail/port_rule.hpp>
#include <boost/url/rfc/detail/userinfo_rule.hpp>
#include "detail/host_rule.hpp"
#include "detail/port_rule.hpp"
#include "detail/userinfo_rule.hpp"

namespace boost {
namespace urls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#ifndef BOOST_URL_RFC_DETAIL_CHARSETS_HPP
#define BOOST_URL_RFC_DETAIL_CHARSETS_HPP

#include <boost/url/rfc/pchars.hpp>
#include <boost/url/rfc/sub_delim_chars.hpp>
#include <boost/url/rfc/unreserved_chars.hpp>
#include "boost/url/rfc/pchars.hpp"
#include "boost/url/rfc/sub_delim_chars.hpp"
#include "boost/url/rfc/unreserved_chars.hpp"

namespace boost {
namespace urls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#ifndef BOOST_URL_RFC_DETAIL_FRAGMENT_PART_RULE_HPP
#define BOOST_URL_RFC_DETAIL_FRAGMENT_PART_RULE_HPP

#include <boost/url/rfc/pct_encoded_rule.hpp>
#include <boost/url/rfc/detail/charsets.hpp>
#include <boost/url/grammar/parse.hpp>
#include "boost/url/rfc/pct_encoded_rule.hpp"
#include "charsets.hpp"
#include "boost/url/grammar/parse.hpp"

namespace boost {
namespace urls {
Expand Down
2 changes: 1 addition & 1 deletion src/rfc/detail/h16_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define BOOST_URL_RFC_DETAIL_IMPL_H16_RULE_HPP

#include <boost/url/detail/config.hpp>
#include <boost/url/rfc/detail/h16_rule.hpp>
#include "h16_rule.hpp"
#include <boost/url/grammar/charset.hpp>
#include <boost/url/grammar/error.hpp>
#include <boost/url/grammar/hexdig_chars.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#ifndef BOOST_URL_RFC_DETAIL_H16_RULE_HPP
#define BOOST_URL_RFC_DETAIL_H16_RULE_HPP

#include <boost/url/detail/config.hpp>
#include <boost/url/error_types.hpp>
#include "boost/url/detail/config.hpp"
#include "boost/url/error_types.hpp"
#include <cstdint>

namespace boost {
Expand Down
4 changes: 2 additions & 2 deletions src/rfc/detail/hier_part_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#define BOOST_URL_RFC_DETAIL_IMPL_HIER_PART_RULE_IPP

#include <boost/url/detail/config.hpp>
#include <boost/url/rfc/detail/hier_part_rule.hpp>
#include <boost/url/rfc/detail/path_rules.hpp>
#include "hier_part_rule.hpp"
#include "boost/url/rfc/detail/path_rules.hpp"
#include <boost/url/grammar/parse.hpp>
#include <boost/url/grammar/parse.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#ifndef BOOST_URL_RFC_DETAIL_HIER_PART_RULE_HPP
#define BOOST_URL_RFC_DETAIL_HIER_PART_RULE_HPP

#include <boost/url/detail/config.hpp>
#include <boost/url/pct_string_view.hpp>
#include <boost/url/rfc/authority_rule.hpp>
#include "boost/url/detail/config.hpp"
#include "boost/url/pct_string_view.hpp"
#include "boost/url/rfc/authority_rule.hpp"
#include <cstdlib>

namespace boost {
Expand Down
6 changes: 3 additions & 3 deletions src/rfc/detail/host_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include <boost/url/detail/config.hpp>
#include <boost/url/rfc/ipv4_address_rule.hpp>
#include <boost/url/rfc/detail/host_rule.hpp>
#include <boost/url/rfc/detail/ip_literal_rule.hpp>
#include <boost/url/rfc/detail/reg_name_rule.hpp>
#include "host_rule.hpp"
#include "ip_literal_rule.hpp"
#include "reg_name_rule.hpp"
#include <boost/url/grammar/parse.hpp>

namespace boost {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#ifndef BOOST_URL_RFC_DETAIL_HOST_RULE_HPP
#define BOOST_URL_RFC_DETAIL_HOST_RULE_HPP

#include <boost/url/host_type.hpp>
#include <boost/url/error_types.hpp>
#include <boost/url/pct_string_view.hpp>
#include <boost/url/ipv4_address.hpp>
#include <boost/url/ipv6_address.hpp>
#include "boost/url/host_type.hpp"
#include "boost/url/error_types.hpp"
#include "boost/url/pct_string_view.hpp"
#include "boost/url/ipv4_address.hpp"
#include "boost/url/ipv6_address.hpp"

namespace boost {
namespace urls {
Expand Down
Loading
Loading