HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdfPathExpressionEval< DomainType > Class Template Reference

#include <pathExpressionEval.h>

+ Inheritance diagram for SdfPathExpressionEval< DomainType >:

Classes

class  IncrementalSearcher
 

Public Member Functions

bool IsEmpty () const
 
template<class ObjectToPath , class PathToObject >
SdfPredicateFunctionResult Match (DomainType const &obj, ObjectToPath const &objToPath, PathToObject const &pathToObj) const
 Test obj for a match with this expression. More...
 
template<class ObjectToPath , class PathToObject >
IncrementalSearcher
< std::decay_t< ObjectToPath >
, std::decay_t< PathToObject > > 
MakeIncrementalSearcher (ObjectToPath &&objToPath, PathToObject &&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 {
  EvalPattern, Not, Open, Close,
  Or, And
}
 
- Protected Member Functions inherited from Sdf_PathExpressionEvalBase
SDF_API SdfPredicateFunctionResult _EvalExpr (TfFunctionRef< SdfPredicateFunctionResult(bool)> invokePattern) const
 
- Protected Attributes inherited from Sdf_PathExpressionEvalBase
std::vector< _Op_ops
 

Detailed Description

template<class DomainType>
class SdfPathExpressionEval< DomainType >

Objects of this class evaluate complete SdfPathExpressions. See SdfMakePathExpressionEval() to create instances of this class, passing the expression to evaluate and an SdfPredicateLibrary to evaluate any embedded predicates.

Definition at line 46 of file pathExpressionEval.h.

Member Function Documentation

template<class DomainType>
bool SdfPathExpressionEval< DomainType >::IsEmpty ( ) const
inline

Definition at line 238 of file pathExpressionEval.h.

template<class DomainType>
template<class ObjectToPath , class PathToObject >
IncrementalSearcher<std::decay_t<ObjectToPath>, std::decay_t<PathToObject> > SdfPathExpressionEval< DomainType >::MakeIncrementalSearcher ( ObjectToPath &&  objToPath,
PathToObject &&  pathToObj 
) const
inline

Create an IncrementalSearcher object, using objToPath and pathToObject to map DomainType instances to their paths and vice-versa.

Definition at line 340 of file pathExpressionEval.h.

template<class DomainType>
template<class ObjectToPath , class PathToObject >
SdfPredicateFunctionResult SdfPathExpressionEval< DomainType >::Match ( DomainType const &  obj,
ObjectToPath const &  objToPath,
PathToObject const &  pathToObj 
) const
inline

Test obj for a match with this expression.

Definition at line 245 of file pathExpressionEval.h.

Friends And Related Function Documentation

template<class DomainType>
SdfPathExpressionEval SdfMakePathExpressionEval ( SdfPathExpression const &  expr,
SdfPredicateLibrary< DomainType > const &  lib 
)
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 366 of file pathExpressionEval.h.


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