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

#include <collectionMembershipQuery.h>

+ Inheritance diagram for Usd_CollectionMembershipQueryBase:

Classes

struct  _Hash
 Hash functor. More...
 

Public Types

using PathExpansionRuleMap = std::unordered_map< SdfPath, TfToken, SdfPath::Hash >
 

Public Member Functions

 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
 

Protected Member Functions

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

TfToken _topExpansionRule
 
PathExpansionRuleMap _pathExpansionRuleMap
 
SdfPathSet _includedCollections
 
bool _hasExcludes =false
 

Detailed Description

Definition at line 54 of file collectionMembershipQuery.h.

Member Typedef Documentation

Holds an unordered map describing membership of paths in this collection and the associated expansionRule for how the paths are to be expanded. Valid expansionRules are UsdTokens->explicitOnly, UsdTokens->expandPrims, and UsdTokens->expandPrimsAndProperties. For more information on the expansion rules, please see the expansionRule attribute on UsdCollectionAPI. If a collection includes another collection, the included collection's PathExpansionRuleMap is merged into this one. If a path is excluded, its expansion rule is set to UsdTokens->exclude.

Definition at line 67 of file collectionMembershipQuery.h.

Constructor & Destructor Documentation

Usd_CollectionMembershipQueryBase::Usd_CollectionMembershipQueryBase ( )
default

Default Constructor, creates an empty Usd_CollectionMembershipQueryBase object

Usd_CollectionMembershipQueryBase::Usd_CollectionMembershipQueryBase ( const PathExpansionRuleMap pathExpansionRuleMap,
const SdfPathSet includedCollections 
)

Constructor that takes a path expansion rule map. The map is scanned for 'excludes' when the Usd_CollectionMembershipQueryBase object is constructed.

Usd_CollectionMembershipQueryBase::Usd_CollectionMembershipQueryBase ( PathExpansionRuleMap &&  pathExpansionRuleMap,
SdfPathSet &&  includedCollections 
)

Constructor that takes a path expansion rule map as an rvalue reference.

Usd_CollectionMembershipQueryBase::Usd_CollectionMembershipQueryBase ( const PathExpansionRuleMap pathExpansionRuleMap,
const SdfPathSet includedCollections,
const TfToken topExpansionRule 
)

Constructor that additionally takes an additional expression evaluator and a top-level expansion rule.

Usd_CollectionMembershipQueryBase::Usd_CollectionMembershipQueryBase ( PathExpansionRuleMap &&  pathExpansionRuleMap,
SdfPathSet &&  includedCollections,
TfToken const &  topExpansionRule 
)

Constructor that additionally takes an additional expression evaluator as an rvalue reference and a top-level expansion rule.

Member Function Documentation

size_t Usd_CollectionMembershipQueryBase::_GetHash ( ) const
inlineprotected

Hash function.

Definition at line 142 of file collectionMembershipQuery.h.

USD_API bool Usd_CollectionMembershipQueryBase::_HasEmptyRuleMap ( ) const
protected
USD_API bool Usd_CollectionMembershipQueryBase::_IsPathIncludedByRuleMap ( const SdfPath path,
TfToken expansionRule = nullptr 
) const
protected
USD_API bool Usd_CollectionMembershipQueryBase::_IsPathIncludedByRuleMap ( const SdfPath path,
const TfToken parentExpansionRule,
TfToken expansionRule = nullptr 
) const
protected
const PathExpansionRuleMap& Usd_CollectionMembershipQueryBase::GetAsPathExpansionRuleMap ( ) const
inline

Returns a raw map of the paths included or excluded in the collection along with the expansion rules for the included paths.

Definition at line 110 of file collectionMembershipQuery.h.

const SdfPathSet& Usd_CollectionMembershipQueryBase::GetIncludedCollections ( ) const
inline

Returns a set of paths for all collections that were included in the collection from which this Usd_CollectionMembershipQueryBase object was computed. This set is recursive, so collections that were included by other collections will be part of this set. The collection from which this Usd_CollectionMembershipQueryBase object was computed is not part of this set.

Definition at line 120 of file collectionMembershipQuery.h.

TfToken Usd_CollectionMembershipQueryBase::GetTopExpansionRule ( ) const
inline

Return the top expansion rule for this query object. This rule is the expansion rule from the UsdCollectionAPI instance that was used to build this query object. The top expansion rule is used when evaluating the expression associated with this query, to determine whether it should match prims only, or both prims and properties.

Definition at line 129 of file collectionMembershipQuery.h.

bool Usd_CollectionMembershipQueryBase::HasExcludes ( ) const
inline

Returns true if the collection excludes one or more paths below an included path via the excludes relationship (see UsdCollectionAPI::GetExcludesRel()).

Definition at line 102 of file collectionMembershipQuery.h.

Member Data Documentation

bool Usd_CollectionMembershipQueryBase::_hasExcludes =false
protected

Definition at line 168 of file collectionMembershipQuery.h.

SdfPathSet Usd_CollectionMembershipQueryBase::_includedCollections
protected

Definition at line 164 of file collectionMembershipQuery.h.

PathExpansionRuleMap Usd_CollectionMembershipQueryBase::_pathExpansionRuleMap
protected

Definition at line 162 of file collectionMembershipQuery.h.

TfToken Usd_CollectionMembershipQueryBase::_topExpansionRule
protected

Definition at line 160 of file collectionMembershipQuery.h.


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