7#ifndef PXR_USD_USD_PRIM_TYPE_INFO_H
8#define PXR_USD_USD_PRIM_TYPE_INFO_H
11#include "pxr/usd/usd/api.h"
12#include "pxr/usd/usd/primDefinition.h"
18PXR_NAMESPACE_OPEN_SCOPE
41 return _typeId.appliedAPISchemas;
71 _primDefinition.load(std::memory_order_acquire)) {
74 return *_FindOrCreatePrimDefinition();
80 return _typeId == other._typeId;
84 return !(*
this == other);
96 friend class Usd_PrimTypeInfoCache;
118 _TypeId(
const _TypeId &typeId) =
default;
119 _TypeId(_TypeId &&typeId) =
default;
122 explicit _TypeId(
const TfToken &primTypeName_)
123 : primTypeName(primTypeName_) {}
126 bool IsEmpty()
const {
127 return primTypeName.
IsEmpty() &&
129 appliedAPISchemas.empty();
133 template <
class HashState>
134 friend void TfHashAppend(HashState &h,
const _TypeId &
id)
136 h.Append(
id.primTypeName,
id.mappedTypeName,
id.appliedAPISchemas);
139 size_t Hash()
const {
143 bool operator==(
const _TypeId &other)
const {
144 return primTypeName == other.primTypeName &&
145 mappedTypeName == other.mappedTypeName &&
146 appliedAPISchemas == other.appliedAPISchemas;
149 bool operator!=(
const _TypeId &other)
const {
150 return !(*
this == other);
161 const _TypeId &_GetTypeId()
const {
return _typeId; }
173 mutable std::atomic<const UsdPrimDefinition *> _primDefinition;
182 mutable std::unique_ptr<UsdPrimDefinition> _ownedPrimDefinition;
185PXR_NAMESPACE_CLOSE_SCOPE
A user-extensible hashing mechanism for use with runtime hash tables.
Token for efficient comparison, assignment, and hashing of known strings.
bool IsEmpty() const
Returns true iff this token contains the empty string "".
TfType represents a dynamic runtime type.
Class representing the builtin definition of a prim given the schemas registered in the schema regist...
Class that holds the full type information for a prim.
const UsdPrimDefinition & GetPrimDefinition() const
Returns the prim definition associated with this prim type's schema type and applied API schemas.
static USD_API const UsdPrimTypeInfo & GetEmptyPrimType()
Returns the empty prim type info.
const TfType & GetSchemaType() const
Returns the TfType of the actual concrete schema that prims of this type will use to create their pri...
const TfToken & GetTypeName() const
Returns the concrete prim type name.
const TfTokenVector & GetAppliedAPISchemas() const
Returns the list of applied API schemas, directly authored on the prim, that impart additional proper...
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...
std::vector< TfToken > TfTokenVector
Convenience types.