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

#include <collectionMembershipQuery.h>

+ Inheritance diagram for Usd_CollectionMembershipQuery< ExprEval >:

Classes

struct  Hash
 Hash functor. More...
 

Public Types

using ExpressionEvaluator = ExprEval
 
- Public Types inherited from Usd_CollectionMembershipQueryBase
using PathExpansionRuleMap = std::unordered_map< SdfPath, TfToken, SdfPath::Hash >
 

Public Member Functions

SdfPredicateFunctionResult IsPathIncluded (const SdfPath &path, TfToken *expansionRule=nullptr) const
 
SdfPredicateFunctionResult IsPathIncluded (const SdfPath &path, const TfToken &parentExpansionRule, TfToken *expansionRule=nullptr) const
 
bool UsesPathExpansionRuleMap () const
 
void SetExpressionEvaluator (ExpressionEvaluator &&exprEval)
 
void SetExpressionEvaluator (ExpressionEvaluator const &exprEval)
 
ExpressionEvaluator const & GetExpressionEvaluator () const
 
bool HasExpression () const
 
bool operator== (Usd_CollectionMembershipQuery const &rhs) const
 Equality operator. More...
 
bool operator!= (Usd_CollectionMembershipQuery const &rhs) const
 Inequality operator. More...
 
size_t GetHash () const
 Hash function. More...
 
- Public Member Functions inherited from Usd_CollectionMembershipQueryBase
 Usd_CollectionMembershipQueryBase ()=default
 
 Usd_CollectionMembershipQueryBase (const PathExpansionRuleMap &pathExpansionRuleMap, const SdfPathSet &includedCollections)
 
 Usd_CollectionMembershipQueryBase (PathExpansionRuleMap &&pathExpansionRuleMap, SdfPathSet &&includedCollections)
 Constructor that takes a path expansion rule map as an rvalue reference. More...
 
 Usd_CollectionMembershipQueryBase (const PathExpansionRuleMap &pathExpansionRuleMap, const SdfPathSet &includedCollections, const TfToken &topExpansionRule)
 
 Usd_CollectionMembershipQueryBase (PathExpansionRuleMap &&pathExpansionRuleMap, SdfPathSet &&includedCollections, TfToken const &topExpansionRule)
 
bool HasExcludes () const
 
const PathExpansionRuleMapGetAsPathExpansionRuleMap () const
 
const SdfPathSetGetIncludedCollections () const
 
TfToken GetTopExpansionRule () const
 

Additional Inherited Members

- Protected Member Functions inherited from Usd_CollectionMembershipQueryBase
size_t _GetHash () const
 Hash function. More...
 
USD_API bool _IsPathIncludedByRuleMap (const SdfPath &path, TfToken *expansionRule=nullptr) const
 
USD_API bool _IsPathIncludedByRuleMap (const SdfPath &path, const TfToken &parentExpansionRule, TfToken *expansionRule=nullptr) const
 
USD_API bool _HasEmptyRuleMap () const
 
- Protected Attributes inherited from Usd_CollectionMembershipQueryBase
TfToken _topExpansionRule
 
PathExpansionRuleMap _pathExpansionRuleMap
 
SdfPathSet _includedCollections
 
bool _hasExcludes =false
 

Detailed Description

template<class ExprEval>
class Usd_CollectionMembershipQuery< ExprEval >

Definition at line 183 of file collectionMembershipQuery.h.

Member Typedef Documentation

template<class ExprEval >
using Usd_CollectionMembershipQuery< ExprEval >::ExpressionEvaluator = ExprEval

Definition at line 186 of file collectionMembershipQuery.h.

Member Function Documentation

template<class ExprEval >
ExpressionEvaluator const& Usd_CollectionMembershipQuery< ExprEval >::GetExpressionEvaluator ( ) const
inline

Return the expression evaluator associated with this query object. This may be an empty evaluator. See HasExpression().

Definition at line 297 of file collectionMembershipQuery.h.

template<class ExprEval >
size_t Usd_CollectionMembershipQuery< ExprEval >::GetHash ( ) const
inline

Hash function.

Definition at line 333 of file collectionMembershipQuery.h.

template<class ExprEval >
bool Usd_CollectionMembershipQuery< ExprEval >::HasExpression ( ) const
inline

Return true if the expression evaluator associated with this query object is not empty. See GetExpressionEvaluator().

Definition at line 303 of file collectionMembershipQuery.h.

template<class ExprEval >
SdfPredicateFunctionResult Usd_CollectionMembershipQuery< ExprEval >::IsPathIncluded ( const SdfPath path,
TfToken expansionRule = nullptr 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns whether the given path is included in the collection from which this Usd_CollectionMembershipQueryBase object was computed. This is the API that clients should use for determining if a given object is a member of the collection. To enumerate all the members of a collection, use UsdComputeIncludedObjectsFromCollection or UsdComputeIncludedPathsFromCollection.

If expansionRule is not nullptr, it is set to the expansion- rule value that caused the path to be included in or excluded from the collection. If path is not included in the collection, expansionRule is set to UsdTokens->exclude. If this query is not using an expansion rule map and is instead using a pattern-based membership expression, then expansionRule is set to one of the special UsdCollectionMembershipQueryTokens values, IncludedByMembershipExpression or ExcludedByMembershipExpression as appropriate.

It is useful to specify this parameter and use this overload of IsPathIncluded(), when you're interested in traversing a subtree and want to know whether the root of the subtree is included in a collection. For evaluating membership of descendants of the root, please use the other overload of IsPathIncluded(), that takes both a path and the parent expansionRule.

The python version of this method only returns the boolean result. It does not return an SdfPredicateFunctionResult or set expansionRule.

Definition at line 218 of file collectionMembershipQuery.h.

template<class ExprEval >
SdfPredicateFunctionResult Usd_CollectionMembershipQuery< ExprEval >::IsPathIncluded ( const SdfPath path,
const TfToken parentExpansionRule,
TfToken expansionRule = nullptr 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns whether the given path, path is included in the collection from which this Usd_CollectionMembershipQueryBase object was computed, given the parent-path's inherited expansion rule, parentExpansionRule.

If expansionRule is not nullptr, it is set to the expansion- rule value that caused the path to be included in or excluded from the collection. If path is not included in the collection, expansionRule is set to UsdTokens->exclude. If this query is not using an expansion rule map and is instead using a pattern-based membership expression, then expansionRule is set to one of the special UsdCollectionMembershipQueryTokens values, IncludedByMembershipExpression or ExcludedByMembershipExpression as appropriate.

The python version of this method only returns the boolean result. It does not return expansionRule.

Definition at line 256 of file collectionMembershipQuery.h.

template<class ExprEval >
bool Usd_CollectionMembershipQuery< ExprEval >::operator!= ( Usd_CollectionMembershipQuery< ExprEval > const &  rhs) const
inline

Inequality operator.

Definition at line 321 of file collectionMembershipQuery.h.

template<class ExprEval >
bool Usd_CollectionMembershipQuery< ExprEval >::operator== ( Usd_CollectionMembershipQuery< ExprEval > const &  rhs) const
inline

Equality operator.

Definition at line 308 of file collectionMembershipQuery.h.

template<class ExprEval >
void Usd_CollectionMembershipQuery< ExprEval >::SetExpressionEvaluator ( ExpressionEvaluator &&  exprEval)
inline

Definition at line 285 of file collectionMembershipQuery.h.

template<class ExprEval >
void Usd_CollectionMembershipQuery< ExprEval >::SetExpressionEvaluator ( ExpressionEvaluator const &  exprEval)
inline

Definition at line 290 of file collectionMembershipQuery.h.

template<class ExprEval >
bool Usd_CollectionMembershipQuery< ExprEval >::UsesPathExpansionRuleMap ( ) const
inline

Return true if this query uses the explicit path-expansion rule method to determine collection membership. Otherwise, return false if it uses the pattern-based membership expression to determine membership.

Definition at line 280 of file collectionMembershipQuery.h.


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