24 #ifndef PXR_USD_SDF_SPEC_H
25 #define PXR_USD_SDF_SPEC_H
40 #include <hboost/type_traits/is_base_of.hpp>
41 #include <hboost/utility/enable_if.hpp>
186 bool IsInert(
bool ignoreChildren =
false)
const;
213 return _HasField(name, &outValue);
223 template <
typename T>
237 template <
typename T>
276 #endif // PXR_USD_SDF_SPEC_H
SDF_API SdfSpec & operator=(const SdfSpec &other)
bool HasField(const TfToken &name, T *value) const
SDF_API VtValue GetInfo(const TfToken &key) const
SDF_API bool operator<(const SdfSpec &rhs) const
T const & UncheckedGet() const
SDF_API bool HasField(const TfToken &name) const
SDF_API VtValue GetField(const TfToken &name) const
Returns a field value by name.
SDF_API void SetInfoDictionaryValue(const TfToken &dictionaryKey, const TfToken &entryKey, const VtValue &value)
SDF_API bool SetField(const TfToken &name, const VtValue &value)
Sets a field value as a boxed VtValue.
SDF_API bool operator==(const SdfSpec &rhs) const
GLsizei const GLchar *const * path
SDF_API const VtValue & GetFallbackForInfo(const TfToken &key) const
Returns the fallback for the info with the given key.
friend size_t hash_value(const SdfSpec &x)
Hash.
SDF_API std::vector< TfToken > ListInfoKeys() const
GLuint const GLchar * name
bool IsEmpty() const
Returns true iff this value is empty.
hboost::intrusive_ptr< Sdf_Identity > Sdf_IdentityRefPtr
SDF_API bool PermissionToEdit() const
Returns whether this object's layer can be edited.
SDF_API const SdfSchemaBase & GetSchema() const
Returns the SdfSchemaBase for the layer that owns this spec.
SDF_API SdfLayerHandle GetLayer() const
Returns the layer that this object belongs to.
T GetFieldAs(const TfToken &name, const T &defaultValue=T()) const
SDF_API std::vector< TfToken > ListFields() const
Returns all fields with values.
SDF_API bool ClearField(const TfToken &name)
Clears a field.
SDF_API bool HasInfo(const TfToken &key) const
SDF_API void SetInfo(const TfToken &key, const VtValue &value)
SDF_API SdfSpecType GetSpecType() const
SDF_API bool IsInert(bool ignoreChildren=false) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
SDF_API TfToken GetMetaDataDisplayGroup(TfToken const &key) const
#define PXR_NAMESPACE_CLOSE_SCOPE
GLsizei const GLfloat * value
SDF_API SdfPath GetPath() const
Returns the scene path of this object.
bool _DeleteSpec(const SdfPath &path)
SDF_API bool WriteToStream(std::ostream &, size_t indent=0) const
Writes this spec to the given stream.
SDF_API TfType GetTypeForInfo(const TfToken &key) const
Returns the data type for the info with the given key.
SDF_API void ClearInfo(const TfToken &key)
bool SetField(const TfToken &name, const T &value)
Sets a field value of type T.
bool _MoveSpec(const SdfPath &oldPath, const SdfPath &newPath) const
SDF_API std::vector< TfToken > GetMetaDataInfoKeys() const
SDF_API bool IsDormant() const
Returns true if this object is invalid or expired.