Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::css::SelectorTraversalBudget Class Reference

Aggregate bound on selector work: element visits and bounded chunks of text inspection. More...

#include "donner/css/selectors/SelectorMatchOptions.h"

Public Member Functions

 SelectorTraversalBudget (std::size_t maximumSteps)
 Create an aggregate selector traversal budget with a caller-selected work-step ceiling.
bool consume ()
 Consume one work step, returning false once the limit is reached.
std::size_t steps () const
 Work steps charged to this budget.
bool rejected () const
 Whether a traversal exceeded the visit ceiling.
std::size_t maximumSteps () const
 Configured maximum work steps.
void reset ()
 Clear accumulated work steps and rejection state while preserving the ceiling.

Static Public Attributes

static constexpr std::size_t kMaximumSteps = 4 * 1024 * 1024
 Maximum work steps in one aggregate cascade or standalone match.

Detailed Description

Aggregate bound on selector work: element visits and bounded chunks of text inspection.

Constructor & Destructor Documentation

◆ SelectorTraversalBudget()

donner::css::SelectorTraversalBudget::SelectorTraversalBudget ( std::size_t maximumSteps)
inlineexplicit

Create an aggregate selector traversal budget with a caller-selected work-step ceiling.

Parameters
maximumStepsMaximum work steps to admit.

The documentation for this class was generated from the following file: