HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
collectionPredicateLibrary.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
8 #define PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
9 
10 /// \file usd/collectionPredicateLibrary.h
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/usd/usd/object.h"
15 #include "pxr/usd/usd/prim.h"
16 
18 
20 
22 
23 /// Return the predicate library used to evaluate SdfPathExpressions in
24 /// UsdCollectionAPI's membershipExpression attributes.
25 ///
26 /// This library provides the following predicate functions. Where the
27 /// documentation says closest-prim, it means the given object if that object is
28 /// a prim, otherwise the object's owning prim if the object is a property.
29 ///
30 /// abstract(bool isAbstract=true)
31 /// Return true if the closest-prim's IsAbstract() == isAbstract.
32 ///
33 /// defined(bool isDefined=true)
34 /// Return true if the closest-prim's IsDefined() == isDefined.
35 ///
36 /// model(bool isModel=true)
37 /// Return true if the given object is a prim and its IsModel() == isModel.
38 /// If the given object is not a prim, return false.
39 ///
40 /// group(bool isGroup=true)
41 /// Return true if the given object is a prim and its IsGroup() == isGroup.
42 /// If the given object is not a prim, return false.
43 ///
44 /// kind(kind1, ... kindN, strict=false)
45 /// Return true if the given object is a prim, and its kind metadata (see
46 /// UsdModelAPI::GetKind()) is one of kind1...kindN (exactly if strict=true,
47 /// or in the KindRegistry::IsA() sense otherwise). If the given object
48 /// is not a prim, return false.
49 ///
50 /// specifier(spec1, ... specN)
51 /// Return true if the given object is a prim and its specifier (see
52 /// UsdPrim::GetSpecifier()) is one of spec1...specN. The spec1..specN
53 /// arguments must be unnamed strings: "over", "class", or "def". If the
54 /// given object is not a prim, return false.
55 ///
56 /// isa(schema1, ... schemaN, strict=false)
57 /// Return true if the given object is a prim and its typed schema (see
58 /// UsdPrim::IsA())is exactly one of schema1...schemaN if strict=true, or a
59 /// subtype of schema1...schemaN if strict=false. If the given object is
60 /// not a prim, return false.
61 ///
62 /// hasAPI(apiSchema1, ... apiSchemaN, [instanceName=name])
63 /// Return true if the given object is a prim and it has an applied API
64 /// schema (see UsdPrim::HasAPI()) of type apiSchema1...apiSchemaN. If the
65 /// 'instanceName' argument is supplied, the prim must have an applied API
66 /// schema with that instanceName. If the given object is not a prim,
67 /// return false.
68 ///
69 /// variant(set1=selGlob1, ... setN=selGlobN)
70 /// Return true if the given object is a prim and it has selections matching
71 /// the literal names or glob patterns selGlob1...selGlobN for the variant
72 /// sets set1...setN. See UsdPrim::GetVariantSets() and
73 /// UsdVariantSets::GetVariantSelection(). If the given object is not a
74 /// prim, return false.
75 ///
76 USD_API
79 
81 
82 #endif // PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
83 
#define USD_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
USD_API UsdObjectPredicateLibrary const & UsdGetCollectionPredicateLibrary()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74