24 #ifndef PXR_USD_SDF_SPEC_TYPE_H 25 #define PXR_USD_SDF_SPEC_TYPE_H 35 PXR_NAMESPACE_OPEN_SCOPE
60 template <
class SchemaType,
class SpecType>
63 _RegisterSpecType(
typeid(SpecType), specTypeEnum,
typeid(SchemaType));
67 template <
class SchemaType,
class SpecType>
70 _RegisterAbstractSpecType(
typeid(SpecType),
typeid(SchemaType));
74 static void _RegisterSpecType(
75 const std::type_info& specCPPType,
SdfSpecType specEnumType,
76 const std::type_info& schemaType);
77 static void _RegisterAbstractSpecType(
78 const std::type_info& specCPPType,
79 const std::type_info& schemaType);
89 static TfType Cast(
const SdfSpec& spec,
const std::type_info& to);
94 static bool CanCast(
const SdfSpec& spec,
const std::type_info& to);
98 static bool CanCast(
SdfSpecType from,
const std::type_info& to);
101 PXR_NAMESPACE_CLOSE_SCOPE
103 #endif // PXR_USD_SDF_SPEC_TYPE_H Base class for all Sdf spec classes.
static void RegisterAbstractSpecType()
Registers the C++ type T as an abstract spec class.
Provides functions to register spec types with the runtime typing system used to cast between C++ spe...
static void RegisterSpecType(SdfSpecType specTypeEnum)
Registers the C++ type T as a concrete spec class.
SdfSpecType
An enum that specifies the type of an object.
TfType represents a dynamic runtime type.