24 #ifndef PXR_USD_USD_COLLECTION_MEMBERSHIP_QUERY_H
25 #define PXR_USD_USD_COLLECTION_MEMBERSHIP_QUERY_H
31 #include "pxr/usd/sdf/path.h"
35 #include <unordered_map>
37 PXR_NAMESPACE_OPEN_SCOPE
73 const SdfPathSet& includedCollections);
78 SdfPathSet&& includedCollections);
104 TfToken *expansionRule=
nullptr)
const;
121 const TfToken &parentExpansionRule,
122 TfToken *expansionRule=
nullptr)
const;
132 return _hasExcludes == rhs._hasExcludes &&
133 _pathExpansionRuleMap == rhs._pathExpansionRuleMap &&
134 _includedCollections == rhs._includedCollections;
139 return !(*
this == rhs);
150 return Hash()(*this);
157 return _pathExpansionRuleMap;
167 return _includedCollections;
173 SdfPathSet _includedCollections;
177 bool _hasExcludes=
false;
188 const UsdStageWeakPtr &stage,
199 const UsdStageWeakPtr &stage,
202 PXR_NAMESPACE_CLOSE_SCOPE
const SdfPathSet & GetIncludedCollections() const
Returns a set of paths for all collections that were included in the collection from which this UsdCo...
std::unordered_map< SdfPath, TfToken, SdfPath::Hash > PathExpansionRuleMap
Holds an unordered map describing membership of paths in this collection and the associated expansion...
unspecified UsdPrimDefaultPredicate
The default predicate used for prim traversals in methods like UsdPrim::GetChildren, UsdStage::Traverse, and by UsdPrimRange.
Standard pointer typedefs.
USD_API std::set< UsdObject > UsdComputeIncludedObjectsFromCollection(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
Returns all the usd objects that satisfy the predicate, pred in the collection represented by the Usd...
const PathExpansionRuleMap & GetAsPathExpansionRuleMap() const
Returns a raw map of the paths included or excluded in the collection along with the expansion rules ...
USD_API bool IsPathIncluded(const SdfPath &path, TfToken *expansionRule=nullptr) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Represents a flattened view of a collection.
UsdCollectionMembershipQuery()=default
Default Constructor, creates an empty UsdCollectionMembershipQuery object.
Token for efficient comparison, assignment, and hashing of known strings.
size_t GetHash() const
Hash function.
A path value used to locate objects in layers or scenegraphs.
bool HasExcludes() const
Returns true if the collection excludes one or more paths below an included path. ...
bool operator==(UsdCollectionMembershipQuery const &rhs) const
Equality operator.
bool operator!=(UsdCollectionMembershipQuery const &rhs) const
Inequality operator.
USD_API SdfPathSet UsdComputeIncludedPathsFromCollection(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
Returns all the paths that satisfy the predicate, pred in the collection represented by the UsdCollec...