Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::ElementLike Concept Reference

Concept for types that can be matched against a selector, such as a donner::svg::SVGElement. More...

#include "donner/base/element/ElementLike.h"

Concept definition

template<typename T>
requires(const T t, const T otherT, const xml::XMLQualifiedNameRef attribName) {
{ t.operator==(otherT) } -> std::same_as<bool>;
{ t.parentElement() } -> std::same_as<std::optional<T>>;
{ t.firstChild() } -> std::same_as<std::optional<T>>;
{ t.lastChild() } -> std::same_as<std::optional<T>>;
{ t.previousSibling() } -> std::same_as<std::optional<T>>;
{ t.nextSibling() } -> std::same_as<std::optional<T>>;
{ t.tagName() } -> std::convertible_to<xml::XMLQualifiedNameRef>;
{ t.isKnownType() } -> std::same_as<bool>;
{ t.id() } -> std::same_as<RcString>;
{ t.className() } -> std::same_as<RcString>;
{ t.getAttribute(attribName) } -> std::same_as<std::optional<RcString>>;
{
t.findMatchingAttributes(attribName)
} -> std::same_as<SmallVector<xml::XMLQualifiedNameRef, 1>>;
}
Concept for types that can be matched against a selector, such as a donner::svg::SVGElement.
Definition ElementLike.h:20
Reference type for XMLQualifiedName, to pass the value to APIs without needing to allocate an RcStrin...
Definition XMLQualifiedName.h:170

Detailed Description

Concept for types that can be matched against a selector, such as a donner::svg::SVGElement.

The type must support tree traversal operations, such as parentElement() and previousSibling(), and type and class information to match against the respective selectors.