Expand description
Path expressions (C++ SdfPathExpression): a set-algebra over path
patterns and collection references, the value type behind pattern-based
collection membership.
An expression combines PathPattern atoms and ExpressionReference
atoms with + (union), & (intersection), - (difference), ~
(complement), and whitespace (implied union), as in
/World//Robot* + %/Sets:big - //{isa:Camera}. Expressions compose across
opinion strength through the special weaker reference %_, which
PathExpression::compose_over substitutes with the next-weaker
expression.
Parsing never fails a caller: a malformed string becomes the empty
expression carrying parse_error, which
keeps it distinguishable from a genuinely empty one. This module owns the
data model and its algebra; matching is PathExpressionEval’s job,
after references are resolved and paths anchored.
Structs§
- Component
- One match component past the prefix.
- Eval
Error - A path expression that cannot be compiled into an evaluator: incomplete (unresolved references or unanchored relative paths), or naming a predicate function the library does not register.
- Expression
Reference - A reference to another expression (C++
SdfPathExpression::ExpressionReference). - FnArg
- One call argument: positional when
nameisNone, keyword otherwise. - FnCall
- One predicate function invocation.
- Glob
Pattern - A compiled glob pattern matched against a whole component name.
- Incremental
Searcher - A stateful depth-first searcher over one expression (C++
SdfPathExpressionEval::IncrementalSearcher), created byPathExpressionEval::incremental_searcher. - Path
Expression - A parsed path expression; see the module docs for the syntax.
- Path
Expression Eval - A compiled path expression over predicate domain
D(C++SdfPathExpressionEval). - Path
Pattern - A single pattern matching scene paths: a literal
Pathprefix followed by match components — literal names, glob components (*,?,[...]),//stretches (arbitrary levels of hierarchy), embedded{predicate}expressions, and at most one trailing property element. - Pred
Result - A predicate function’s answer for one domain object, carrying whether the
answer is known to hold for every descendant of that object (C++
SdfPredicateFunctionResult). - Predicate
Expression - A logical expression of named predicate functions, as written between
{and}in a path pattern ({isa:Imageable and not abstract}). - Predicate
Library - The predicate functions available to a path expression over domain
D(C++SdfPredicateLibrary). - Predicate
Program - A predicate expression linked against a library, ready to evaluate per
domain object (C++
SdfPredicateProgram).
Enums§
- FnCall
Kind - How a call was spelled, which
PredicateExpression’s text reproduces. - Predicate
Arg - An argument value the predicate grammar can spell.
- SetOp
- The binary set operators, ordered tightest-binding first. All are
left-associative; note
-binds loosest of all.
Functions§
- link_
predicate_ expression - Links
expragainstlibrary, binding every call (C++SdfLinkPredicateExpression). An empty expression links to an empty program, which evaluates to a constantfalse.
Type Aliases§
- Predicate
Binder - Binds one predicate name’s calls to functions: given the call’s arguments,
produce the function, or
Nonewhen the arguments do not bind (C++SdfPredicateLibrary::DefineBinder). - Predicate
Fn - The function a predicate call binds to, evaluated per domain object.