24 #ifndef PXR_USD_USD_PRIM_TYPE_INFO_H 25 #define PXR_USD_USD_PRIM_TYPE_INFO_H 28 #include "pxr/usd/usd/api.h" 29 #include "pxr/usd/usd/primDefinition.h" 35 PXR_NAMESPACE_OPEN_SCOPE
58 return _typeId.appliedAPISchemas;
88 _primDefinition.load(std::memory_order_acquire)) {
91 return *_FindOrCreatePrimDefinition();
97 return _typeId == other._typeId;
101 return !(*
this == other);
113 friend class Usd_PrimTypeInfoCache;
135 _TypeId(
const _TypeId &typeId) =
default;
136 _TypeId(_TypeId &&typeId) =
default;
139 explicit _TypeId(
const TfToken &primTypeName_)
140 : primTypeName(primTypeName_) {}
143 bool IsEmpty()
const {
144 return primTypeName.
IsEmpty() &&
146 appliedAPISchemas.empty();
150 template <
class HashState>
151 friend void TfHashAppend(HashState &h,
const _TypeId &
id)
153 h.Append(
id.primTypeName,
id.mappedTypeName,
id.appliedAPISchemas);
156 size_t Hash()
const {
160 bool operator==(
const _TypeId &other)
const {
161 return primTypeName == other.primTypeName &&
162 mappedTypeName == other.mappedTypeName &&
163 appliedAPISchemas == other.appliedAPISchemas;
166 bool operator!=(
const _TypeId &other)
const {
167 return !(*
this == other);
178 const _TypeId &_GetTypeId()
const {
return _typeId; }
190 mutable std::atomic<const UsdPrimDefinition *> _primDefinition;
199 mutable std::unique_ptr<UsdPrimDefinition> _ownedPrimDefinition;
202 PXR_NAMESPACE_CLOSE_SCOPE
204 #endif //PXR_USD_USD_PRIM_TYPE_INFO_H bool IsEmpty() const
Returns true iff this token contains the empty string "".
const TfType & GetSchemaType() const
Returns the TfType of the actual concrete schema that prims of this type will use to create their pri...
const UsdPrimDefinition & GetPrimDefinition() const
Returns the prim definition associated with this prim type's schema type and applied API schemas.
A user-extensible hashing mechanism for use with runtime hash tables.
static USD_API const UsdPrimTypeInfo & GetEmptyPrimType()
Returns the empty prim type info.
Token for efficient comparison, assignment, and hashing of known strings.
const TfTokenVector & GetAppliedAPISchemas() const
Returns the list of applied API schemas, directly authored on the prim, that impart additional proper...
std::vector< TfToken > TfTokenVector
Convenience types.
Class that holds the full type information for a prim.
Class representing the builtin definition of a prim given the schemas registered in the schema regist...
TfType represents a dynamic runtime type.
const TfToken & GetSchemaTypeName() const
Returns the type name associated with the schema type returned from GetSchemaType.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
const TfToken & GetTypeName() const
Returns the concrete prim type name.