RuleScopeResolver.h header
#include <ew/app/RuleScopeResolver.h>
Namespace ew::app
Functions
QString ew::app::timeline::describeScope(const ew::core::project::Project &project, const ew::core::timeline::RuleScope &scope)
scope written for a person – "every Item and everything beneath it", "everything tagged
act-one" – naming what it is about rather than which enumerator it holds.
std::vector< ew::core::foundation::ContentId > ew::app::timeline::objectsInScope(const ew::core::project::Project &project, const ew::core::timeline::RuleScope &scope)
Every object scope currently matches, in project order.
The one answer. The rule editor shows a count so a writer can see what a rule will touch before saving it, and the validator walks a set to evaluate it. If those were two walks, the count would eventually promise something the evaluation did not deliver – and a count that lies about a rule's reach is worse than no count, because it is believed.
int ew::app::timeline::scopeMatchCount(const ew::core::project::Project &project, const ew::core::timeline::RuleScope &scope)
How many objects scope currently matches.
Counted through objectsInScope rather than by a second walk, for the reason above. A rule scoped to a category never touches the rest of the project, which is what makes a scope the performance lever as well as the expressive one.