1 //
2 // Copyright 2016 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 USDCONTRIVED_GENERATED_NONAPPLIEDAPI_H
25 #define USDCONTRIVED_GENERATED_NONAPPLIEDAPI_H
26 
27 /// \file usdContrived/nonAppliedAPI.h
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdContrived/api.h"
31 #include "pxr/usd/usd/aPISchemaBase.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 
35 #include "pxr/base/vt/value.h"
36 
37 #include "pxr/base/gf/vec3d.h"
38 #include "pxr/base/gf/vec3f.h"
39 #include "pxr/base/gf/matrix4d.h"
40 
41 #include "pxr/base/tf/token.h"
42 #include "pxr/base/tf/type.h"
43 
44 namespace foo {
45 
46 class SdfAssetPath;
47 
48 // -------------------------------------------------------------------------- //
49 // NONAPPLIEDAPI                                                              //
50 // -------------------------------------------------------------------------- //
51 
52 /// \class UsdContrivedNonAppliedAPI
53 ///
54 ///
55 class UsdContrivedNonAppliedAPI : public UsdAPISchemaBase
56 {
57 public:
58     /// Compile time constant representing what kind of schema this class is.
59     ///
60     /// \sa UsdSchemaKind
61     static const UsdSchemaKind schemaKind = UsdSchemaKind::NonAppliedAPI;
62 
63     /// Construct a UsdContrivedNonAppliedAPI on UsdPrim \p prim .
64     /// Equivalent to UsdContrivedNonAppliedAPI::Get(prim.GetStage(), prim.GetPath())
65     /// for a \em valid \p prim, but will not immediately throw an error for
66     /// an invalid \p prim
67     explicit UsdContrivedNonAppliedAPI(const UsdPrim& prim=UsdPrim())
UsdAPISchemaBase(prim)68         : UsdAPISchemaBase(prim)
69     {
70     }
71 
72     /// Construct a UsdContrivedNonAppliedAPI on the prim held by \p schemaObj .
73     /// Should be preferred over UsdContrivedNonAppliedAPI(schemaObj.GetPrim()),
74     /// as it preserves SchemaBase state.
UsdContrivedNonAppliedAPI(const UsdSchemaBase & schemaObj)75     explicit UsdContrivedNonAppliedAPI(const UsdSchemaBase& schemaObj)
76         : UsdAPISchemaBase(schemaObj)
77     {
78     }
79 
80     /// Destructor.
81     USDCONTRIVED_API
82     virtual ~UsdContrivedNonAppliedAPI();
83 
84     /// Return a vector of names of all pre-declared attributes for this schema
85     /// class and all its ancestor classes.  Does not include attributes that
86     /// may be authored by custom/extended methods of the schemas involved.
87     USDCONTRIVED_API
88     static const TfTokenVector &
89     GetSchemaAttributeNames(bool includeInherited=true);
90 
91     /// Return a UsdContrivedNonAppliedAPI holding the prim adhering to this
92     /// schema at \p path on \p stage.  If no prim exists at \p path on
93     /// \p stage, or if the prim at that path does not adhere to this schema,
94     /// return an invalid schema object.  This is shorthand for the following:
95     ///
96     /// \code
97     /// UsdContrivedNonAppliedAPI(stage->GetPrimAtPath(path));
98     /// \endcode
99     ///
100     USDCONTRIVED_API
101     static UsdContrivedNonAppliedAPI
102     Get(const UsdStagePtr &stage, const SdfPath &path);
103 
104 
105 protected:
106     /// Returns the kind of schema this class belongs to.
107     ///
108     /// \sa UsdSchemaKind
109     USDCONTRIVED_API
110     UsdSchemaKind _GetSchemaKind() const override;
111 
112 private:
113     // needs to invoke _GetStaticTfType.
114     friend class UsdSchemaRegistry;
115     USDCONTRIVED_API
116     static const TfType &_GetStaticTfType();
117 
118     static bool _IsTypedSchema();
119 
120     // override SchemaBase virtuals.
121     USDCONTRIVED_API
122     const TfType &_GetTfType() const override;
123 
124 public:
125     // ===================================================================== //
126     // Feel free to add custom code below this line, it will be preserved by
127     // the code generator.
128     //
129     // Just remember to:
130     //  - Close the class declaration with };
131     //  - Close the namespace with }
132     //  - Close the include guard with #endif
133     // ===================================================================== //
134     // --(BEGIN CUSTOM CODE)--
135 };
136 
137 }
138 
139 #endif
140