HDK
|
#include <pathExpressionEval.h>
Public Member Functions | |
bool | Match (DomainType obj) |
template<class ObjectToPath , class PathToObject > | |
bool | Match (DomainType obj, ObjectToPath const &objToPath, PathToObject const &pathToObj) const |
Public Member Functions inherited from Sdf_PathExpressionEvalBase | |
bool | IsEmpty () const |
operator bool () const | |
Return true if this is not the empty evaluator, false otherwise. More... | |
Friends | |
SdfPathExpressionEval | SdfMakePathExpressionEval (SdfPathExpression const &expr, SdfPredicateLibrary< DomainType > const &lib) |
Additional Inherited Members | |
Protected Types inherited from Sdf_PathExpressionEvalBase | |
enum | _Op { PatternMatch, Not, Open, Close, Or, And } |
Protected Member Functions inherited from Sdf_PathExpressionEvalBase | |
SDF_API bool | _Match (TfFunctionRef< bool(bool)> patternMatch) const |
Protected Attributes inherited from Sdf_PathExpressionEvalBase | |
std::vector< _Op > | _ops |
Objects of this class evaluate complete SdfPathExpressions on instances of DomainType. See SdfMakePathExpressionEval() to create instances of this class, passing the expression to evaluate and an SdfPredicateLibrary<DomainType> to evaluate any embedded predicates.
This class must be able to find the DomainType instance associated with an SdfPath and vice-versa. There are two ways to do this; either explicitly by passing function objects to Match(), or by providing ADL-found overloads of the following two functions:
The function SdfPathExpressionPathToObject()'s second argument is always nullptr. It exists to disambiguate overloads, since functions cannot be overloaded on return-type. It is also an argument rather than an explicit template parameter since function calls with explicit template arguments are not found via ADL.
Definition at line 45 of file pathExpressionEval.h.
|
inline |
Test obj
for a match with this expression. Overloads of SdfPathExpressionPathToObject() and SdfPathExpressionObjectToPath() for DomainType must be found by ADL.
Definition at line 189 of file pathExpressionEval.h.
|
inline |
Test obj
for a match with this expression. Use objToPath
and pathToObj
to map between corresponding SdfPath and DomainType instances.
Definition at line 196 of file pathExpressionEval.h.
|
friend |
Make an SdfPathExpressionEval object to evaluate expr
using lib
to link any embedded predicate expressions.
Create an SdfPathExpressionEval object that can evaluate the complete SdfPathExpression expr
on DomainType instances, using lib
, an SdfPredicateLibrary<DomainType> to evaluate any embedded predicates.
Note that expr
must be "complete", meaning that SdfPathExpression::IsComplete() must return true. If an evaluator cannot succesfully be made, possibly because the passed is not complete, or if any embedded SdfPredicateExpression s cannot be successfully linked with lib
, or another reason, issue an error and return the empty SdfPathExpressionEval object. See SdfPathExpressionEval::IsEmpty().
Definition at line 258 of file pathExpressionEval.h.