11#ifndef ADA_URL_AGGREGATOR_H
12#define ADA_URL_AGGREGATOR_H
320#if ADA_INCLUDE_URL_PATTERN
322 template <url_pattern_regex::regex_concept regex_prov
ider>
323 friend tl::expected<url_pattern<regex_provider>,
errors>
325 std::variant<std::string_view, url_pattern_init> &&
input,
329 std::string buffer{};
339 inline void add_authority_slashes_if_needed();
351 return this->parse_port(
view,
false);
380 [[
nodiscard]]
constexpr bool cannot_have_credentials_or_port()
const;
382 template <
bool overr
ide_hostname = false>
383 bool set_host_or_hostname(std::string_view
input);
387 inline void update_base_authority(std::string_view
base_buffer,
388 const url_components &base);
389 inline void update_unencoded_base_hash(std::string_view
input);
390 inline void update_base_hostname(std::string_view
input);
391 inline void update_base_search(std::string_view
input);
392 inline void update_base_search(std::string_view
input,
394 inline void update_base_pathname(std::string_view
input);
395 inline void update_base_username(std::string_view
input);
396 inline void append_base_username(std::string_view
input);
397 inline void update_base_password(std::string_view
input);
398 inline void append_base_password(std::string_view
input);
400 inline void append_base_pathname(std::string_view
input);
402 constexpr void clear_hostname();
403 constexpr void clear_password();
404 constexpr void clear_pathname()
override;
406 void delete_dash_dot();
420 inline void set_scheme_from_view_with_colon(
Cross-platform compiler macros and common definitions.
#define ada_lifetime_bound
#define ada_really_inline
errors
Error codes for URL parsing operations.
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)
Memory-efficient URL representation using a single buffer.
url_aggregator & operator=(const url_aggregator &u)=default
url_aggregator & operator=(url_aggregator &&u) noexcept=default
ada_really_inline const url_components & get_components() const noexcept
constexpr bool has_non_empty_password() const noexcept
void set_hash(std::string_view input)
constexpr bool validate() const noexcept
void clear_search() override
std::string_view get_search() const ada_lifetime_bound
friend url_aggregator parser::parse_url(std::string_view, const url_aggregator *)
std::string_view get_hash() const ada_lifetime_bound
friend void helpers::strip_trailing_spaces_from_opaque_path(url_aggregator &url)
std::string to_string() const override
std::string_view get_password() const ada_lifetime_bound
std::string_view get_host() const ada_lifetime_bound
std::string_view get_username() const ada_lifetime_bound
friend url_aggregator parser::parse_url_impl(std::string_view, const url_aggregator *)
std::string_view get_port() const ada_lifetime_bound
std::string to_diagram() const
constexpr bool has_hostname() const noexcept
bool set_protocol(std::string_view input)
constexpr bool has_search() const noexcept override
std::string get_origin() const override
constexpr std::string_view get_href() const noexcept ada_lifetime_bound
constexpr bool has_empty_hostname() const noexcept
constexpr bool has_password() const noexcept
ada_really_inline uint32_t get_pathname_length() const noexcept
bool has_valid_domain() const noexcept override
bool set_hostname(std::string_view input)
bool set_password(std::string_view input)
~url_aggregator() override=default
bool set_pathname(std::string_view input)
bool set_href(std::string_view input)
constexpr bool has_hash() const noexcept override
constexpr std::string_view get_pathname() const ada_lifetime_bound
void set_search(std::string_view input)
std::string_view get_hostname() const ada_lifetime_bound
std::string_view get_protocol() const ada_lifetime_bound
constexpr bool has_port() const noexcept
ada_really_inline constexpr bool has_credentials() const noexcept
url_aggregator(url_aggregator &&u) noexcept=default
bool set_host(std::string_view input)
bool set_port(std::string_view input)
url_aggregator(const url_aggregator &u)=default
constexpr bool has_non_empty_username() const noexcept
bool set_username(std::string_view input)
Abstract base class for URL representations.
Stores byte offsets for URL components within a buffer.
Represents a parsed URL with individual string components.
Base class and common definitions for URL types.
Declaration for the URL Components.