class HEMPLATE_EXPORT atomLink // NOLINT *-identifier-naming
: public element_builder<"atom:link", element::Type::Boolean>
{
static auto attributes(attribute_list& list,
std::string_view rel,
std::string_view type)
{
return list.set({
{"rel", rel},
{"type", type},
});
}
public:
static constexpr const auto default_rel = "self";
static constexpr const auto default_type = "application/rss+xml";
explicit atomLink(std::string rel,
std::string type,
const attribute_list& attributes,
const std::derived_from<element> auto&... children)
: element_builder(attributes.add({{"rel", std::move(rel)},
{"type", std::move(type)}}),
children...)
explicit atomLink(std::string_view rel,
std::string_view type,
attribute_list attrs,
const is_element auto&... children)
: element_builder(attributes(attrs, rel, type), children...)
{
}
explicit atomLink(std::string rel,
std::string type,
const attribute_list& attributes,
explicit atomLink(std::string_view rel,
std::string_view type,
attribute_list attrs,
std::span<const element> children)
: element_builder(attributes.add({{"rel", std::move(rel)},
{"type", std::move(type)}}),
children)
: element_builder(attributes(attrs, rel, type), children)
{
}
explicit atomLink(const std::derived_from<element> auto&... children)
: atomLink(default_rel, default_type, {}, children...)
explicit atomLink(attribute_list attrs, const is_element auto&... children)
: atomLink(default_rel, default_type, std::move(attrs), children...)
{
}
explicit atomLink(std::span<const element> children)
: atomLink(default_rel, default_type, {}, children)
explicit atomLink(attribute_list attrs, std::span<const element> children)
: atomLink(default_rel, default_type, std::move(attrs), children)
{
}
explicit atomLink(const attribute_list& attributes,
const std::derived_from<element> auto&... children)
: atomLink(default_rel, default_type, attributes, children...)
explicit atomLink(const is_element auto&... children)
: atomLink({}, children...)
{
}
explicit atomLink(const attribute_list& attributes,
std::span<const element> children)
: atomLink(default_rel, default_type, attributes, children)
explicit atomLink(std::span<const element> children)
: atomLink({}, children)
{
}
};