Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
SelectorWalk.h File Reference

Helpers shared by the per-stylesheet selector caches (RuleIndex and SelectorDependencySummary): reading simple selectors out of compounds and comparing the names they key on. More...

#include <string_view>
#include <variant>
#include <vector>
#include "donner/base/RcString.h"
#include "donner/css/selectors/ComplexSelector.h"
#include "donner/css/selectors/CompoundSelector.h"
Include dependency graph for SelectorWalk.h:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.
namespace  donner::svg::components
 Contains the implementation of the Donner ECS,.

Functions

int donner::svg::components::CompareLowercased (std::string_view stored, std::string_view probe)
 Compare stored, which is already ASCII-lowercased, with probe ASCII-lowercased, as <=> would: negative, zero or positive.
int donner::svg::components::CompareExact (std::string_view stored, std::string_view probe)
 Compare stored with probe exactly, as <=> would: negative, zero or positive.
RcString donner::svg::components::Lowercased (const RcString &name)
 name with ASCII A-Z lowercased, sharing name's storage when it has no capitals.
template<typename Selector, typename Accept>
const Selector * donner::svg::components::FindSimple (const std::vector< css::CompoundSelector::Entry > &simple, Accept accept)
 The first simple selector of type Selector in simple that accept admits.
bool donner::svg::components::IsSiblingCombinator (css::Combinator combinator)
 Whether a combinator relates an element to its siblings (+ or ~) rather than to its ancestors.

Variables

constexpr auto donner::svg::components::kAnySelector = [](const auto& ) { return true; }
 Admits every simple selector of the requested type.

Detailed Description

Helpers shared by the per-stylesheet selector caches (RuleIndex and SelectorDependencySummary): reading simple selectors out of compounds and comparing the names they key on.