HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdObjectCollectionExpressionEvaluator Class Reference

Evaluates SdfPathExpressions with objects from a given UsdStage. More...

#include <collectionMembershipQuery.h>

Public Types

using PathExprEval = SdfPathExpressionEval< UsdObject >
 
using IncrementalSearcher = typename PathExprEval::IncrementalSearcher< ObjToPath, PathToObj >
 

Public Member Functions

 UsdObjectCollectionExpressionEvaluator ()=default
 Construct an empty evaluator. More...
 
USD_API UsdObjectCollectionExpressionEvaluator (UsdStageWeakPtr const &stage, SdfPathExpression const &expr)
 
bool IsEmpty () const
 
UsdStageWeakPtr const & GetStage () const
 
USD_API SdfPredicateFunctionResult Match (SdfPath const &path) const
 Return the result of evaluating the expression against path. More...
 
USD_API SdfPredicateFunctionResult Match (UsdObject const &object) const
 Return the result of evaluating the expression against object. More...
 
USD_API IncrementalSearcher MakeIncrementalSearcher () const
 

Detailed Description

Evaluates SdfPathExpressions with objects from a given UsdStage.

Definition at line 345 of file collectionMembershipQuery.h.

Member Typedef Documentation

using UsdObjectCollectionExpressionEvaluator::IncrementalSearcher = typename PathExprEval::IncrementalSearcher<ObjToPath, PathToObj>

Definition at line 362 of file collectionMembershipQuery.h.

Constructor & Destructor Documentation

UsdObjectCollectionExpressionEvaluator::UsdObjectCollectionExpressionEvaluator ( )
default

Construct an empty evaluator.

USD_API UsdObjectCollectionExpressionEvaluator::UsdObjectCollectionExpressionEvaluator ( UsdStageWeakPtr const &  stage,
SdfPathExpression const &  expr 
)

Construct an evaluator that evalutates expr on objects from stage. The expr must be "complete" (see SdfPathExpression::IsComplete()).

Typically these objects are not constructed directly, but instead are created by UsdCollectionAPI::ComputeMembershipQuery() for Usd_CollectionMembershipQuery's use. However it is possible to construct them directly if one wishes. Consider calling UsdCollectionAPI::ResolveCompleteMembershipExpression() to produce an approprate expression.

Member Function Documentation

UsdStageWeakPtr const& UsdObjectCollectionExpressionEvaluator::GetStage ( ) const
inline

Return the stage this object was constructed with, or nullptr if it was default constructed.

Definition at line 389 of file collectionMembershipQuery.h.

bool UsdObjectCollectionExpressionEvaluator::IsEmpty ( ) const
inline

Return true if this evaluator has an invalid stage or an empty underlying SdfPathExpressionEval object.

Definition at line 383 of file collectionMembershipQuery.h.

USD_API IncrementalSearcher UsdObjectCollectionExpressionEvaluator::MakeIncrementalSearcher ( ) const

Create an incremental searcher from this evaluator. See SdfPathExpressionEval::IncrementalSearcher for more info and API.

The returned IncrementalSearcher refers to the evaluator object owned by this UsdObjectCollectionExpressionEvaluator object. This means that the IncrementalSearcher must not be used after this UsdObjectCollectionExpressionEvaluator object's lifetime ends.

USD_API SdfPredicateFunctionResult UsdObjectCollectionExpressionEvaluator::Match ( SdfPath const &  path) const

Return the result of evaluating the expression against path.

USD_API SdfPredicateFunctionResult UsdObjectCollectionExpressionEvaluator::Match ( UsdObject const &  object) const

Return the result of evaluating the expression against object.


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