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 Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
25 #define PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
26 
27 /// \file usd/collectionPredicateLibrary.h
28 
29 #include "pxr/pxr.h"
30 
31 #include "pxr/usd/usd/object.h"
32 #include "pxr/usd/usd/prim.h"
33 
35 
37 
39 
40 /// Return the predicate library used to evaluate SdfPathExpressions in
41 /// UsdCollectionAPI's membershipExpression attributes.
42 ///
43 /// This library provides the following predicate functions. Where the
44 /// documentation says closest-prim, it means the given object if that object is
45 /// a prim, otherwise the object's owning prim if the object is a property.
46 ///
47 /// abstract(bool isAbstract=true)
48 /// Return true if the closest-prim's IsAbstract() == isAbstract.
49 ///
50 /// defined(bool isDefined=true)
51 /// Return true if the closest-prim's IsDefined() == isDefined.
52 ///
53 /// model(bool isModel=true)
54 /// Return true if the given object is a prim and its IsModel() == isModel.
55 /// If the given object is not a prim, return false.
56 ///
57 /// group(bool isGroup=true)
58 /// Return true if the given object is a prim and its IsGroup() == isGroup.
59 /// If the given object is not a prim, return false.
60 ///
61 /// kind(kind1, ... kindN, strict=false)
62 /// Return true if the given object is a prim, and its kind metadata (see
63 /// UsdModelAPI::GetKind()) is one of kind1...kindN (exactly if strict=true,
64 /// or in the KindRegistry::IsA() sense otherwise). If the given object
65 /// is not a prim, return false.
66 ///
67 /// specifier(spec1, ... specN)
68 /// Return true if the given object is a prim and its specifier (see
69 /// UsdPrim::GetSpecifier()) is one of spec1...specN. The spec1..specN
70 /// arguments must be unnamed strings: "over", "class", or "def". If the
71 /// given object is not a prim, return false.
72 ///
73 /// isa(schema1, ... schemaN, strict=false)
74 /// Return true if the given object is a prim and its typed schema (see
75 /// UsdPrim::IsA())is exactly one of schema1...schemaN if strict=true, or a
76 /// subtype of schema1...schemaN if strict=false. If the given object is
77 /// not a prim, return false.
78 ///
79 /// hasAPI(apiSchema1, ... apiSchemaN, [instanceName=name])
80 /// Return true if the given object is a prim and it has an applied API
81 /// schema (see UsdPrim::HasAPI()) of type apiSchema1...apiSchemaN. If the
82 /// 'instanceName' argument is supplied, the prim must have an applied API
83 /// schema with that instanceName. If the given object is not a prim,
84 /// return false.
85 ///
86 /// variant(set1=selGlob1, ... setN=selGlobN)
87 /// Return true if the given object is a prim and it has selections matching
88 /// the literal names or glob patterns selGlob1...selGlobN for the variant
89 /// sets set1...setN. See UsdPrim::GetVariantSets() and
90 /// UsdVariantSets::GetVariantSelection(). If the given object is not a
91 /// prim, return false.
92 ///
93 USD_API
96 
98 
99 #endif // PXR_USD_USD_COLLECTION_PREDICATE_LIBRARY_H
100 
#define USD_API
Definition: api.h:40
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USD_API UsdObjectPredicateLibrary const & UsdGetCollectionPredicateLibrary()