24 #ifndef USD_GENERATED_APISCHEMABASE_H
25 #define USD_GENERATED_APISCHEMABASE_H
30 #include "pxr/usd/usd/api.h"
31 #include "pxr/usd/usd/schemaBase.h"
35 #include "pxr/base/vt/value.h"
42 #include "pxr/base/tf/type.h"
44 PXR_NAMESPACE_OPEN_SCOPE
164 static const TfType &_GetStaticTfType();
166 static bool _IsTypedSchema();
170 const TfType &_GetTfType()
const override;
190 , _instanceName(instanceName)
199 , _instanceName(instanceName)
209 return _instanceName;
233 template <
typename APISchemaType>
238 if (prim.
ApplyAPI<APISchemaType>()) {
239 return APISchemaType(prim);
241 return APISchemaType();
268 template <
typename APISchemaType>
274 if (prim.
ApplyAPI<APISchemaType>(instanceName)) {
275 return APISchemaType(prim, instanceName);
277 return APISchemaType();
302 PXR_NAMESPACE_CLOSE_SCOPE
virtual USD_API ~UsdAPISchemaBase()=0
Destructor.
UsdAPISchemaBase(const UsdSchemaBase &schemaObj, const TfToken &instanceName)
Construct a multiple-apply UsdAPISchemaBase on the prim held by schemaObj with the given instanceName...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
bool ApplyAPI() const
Applies a single-apply API schema with the given C++ type 'SchemaType' to this prim in the current ed...
UsdAPISchemaBase(const UsdPrim &prim=UsdPrim())
Construct a UsdAPISchemaBase on UsdPrim prim .
static APISchemaType _ApplyAPISchema(const UsdPrim &prim, const TfToken &apiSchemaName)
Helper method to apply a single-apply API schema with the given schema name apiSchemaName' and C++ ty...
The base class for all API schemas.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Token for efficient comparison, assignment, and hashing of known strings.
USD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
USD_API bool _IsCompatible() const override
Check whether this APISchema object is valid for the currently held prim.
UsdAPISchemaBase(const UsdPrim &prim, const TfToken &instanceName)
Construct a multiple-apply UsdAPISchemaBase on UsdPrim prim with the specified instanceName.
static USD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
Contains an asset path and an optional resolved path.
Represents abstract or base schema types that are interface-only and cannot be instantiated.
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
UsdAPISchemaBase(const UsdSchemaBase &schemaObj)
Construct a UsdAPISchemaBase on the prim held by schemaObj .
static APISchemaType _MultipleApplyAPISchema(const UsdPrim &prim, const TfToken &apiSchemaName, const TfToken &instanceName)
Helper method to apply a multiple-apply API schema with the given schema name apiSchemaName', C++ type 'APISchemaType' and instance name instanceName.
The base class for all schema types in Usd.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
const TfToken & _GetInstanceName() const
Returns the instance name of the API schema object belonging to a multiple-apply API schema...