HDK
|
#include <data.h>
Public Member Functions | |
SdfData () | |
virtual SDF_API | ~SdfData () |
virtual SDF_API bool | StreamsData () const |
SdfAbstractData overrides. More... | |
virtual SDF_API bool | IsDetached () const |
virtual SDF_API void | CreateSpec (const SdfPath &path, SdfSpecType specType) |
virtual SDF_API bool | HasSpec (const SdfPath &path) const |
Return true if this data has a spec for path. More... | |
virtual SDF_API void | EraseSpec (const SdfPath &path) |
virtual SDF_API void | MoveSpec (const SdfPath &oldPath, const SdfPath &newPath) |
virtual SDF_API SdfSpecType | GetSpecType (const SdfPath &path) const |
virtual SDF_API bool | Has (const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value) const |
virtual SDF_API bool | Has (const SdfPath &path, const TfToken &fieldName, VtValue *value=NULL) const |
virtual SDF_API bool | HasSpecAndField (const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value, SdfSpecType *specType) const |
virtual SDF_API bool | HasSpecAndField (const SdfPath &path, const TfToken &fieldName, VtValue *value, SdfSpecType *specType) const |
virtual SDF_API VtValue | Get (const SdfPath &path, const TfToken &fieldName) const |
virtual SDF_API void | Set (const SdfPath &path, const TfToken &fieldName, const VtValue &value) |
virtual SDF_API void | Set (const SdfPath &path, const TfToken &fieldName, const SdfAbstractDataConstValue &value) |
virtual SDF_API void | Erase (const SdfPath &path, const TfToken &fieldName) |
Remove the field at path and fieldName , if one exists. More... | |
virtual SDF_API std::vector < TfToken > | List (const SdfPath &path) const |
Return the names of all the fields that are set at path . More... | |
virtual SDF_API std::set< double > | ListAllTimeSamples () const |
virtual SDF_API std::set< double > | ListTimeSamplesForPath (const SdfPath &path) const |
virtual SDF_API bool | GetBracketingTimeSamples (double time, double *tLower, double *tUpper) const |
virtual SDF_API size_t | GetNumTimeSamplesForPath (const SdfPath &path) const |
virtual SDF_API bool | GetBracketingTimeSamplesForPath (const SdfPath &path, double time, double *tLower, double *tUpper) const |
virtual SDF_API bool | QueryTimeSample (const SdfPath &path, double time, SdfAbstractDataValue *optionalValue) const |
virtual SDF_API bool | QueryTimeSample (const SdfPath &path, double time, VtValue *value) const |
virtual SDF_API void | SetTimeSample (const SdfPath &path, double time, const VtValue &value) |
virtual SDF_API void | EraseTimeSample (const SdfPath &path, double time) |
Public Member Functions inherited from SdfAbstractData | |
SdfAbstractData () | |
virtual SDF_API | ~SdfAbstractData () |
virtual SDF_API void | CopyFrom (const SdfAbstractDataConstPtr &source) |
virtual SDF_API bool | IsEmpty () const |
virtual SDF_API bool | Equals (const SdfAbstractDataRefPtr &rhs) const |
virtual SDF_API void | WriteToStream (std::ostream &out) const |
SDF_API void | VisitSpecs (SdfAbstractDataSpecVisitor *visitor) const |
virtual SDF_API std::type_info const & | GetTypeid (const SdfPath &path, const TfToken &fieldName) const |
template<class T > | |
T | GetAs (const SdfPath &path, const TfToken &fieldName, const T &defaultValue=T()) const |
virtual SDF_API bool | HasDictKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, SdfAbstractDataValue *value) const |
virtual SDF_API bool | HasDictKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, VtValue *value=NULL) const |
virtual SDF_API VtValue | GetDictValueByKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath) const |
virtual SDF_API void | SetDictValueByKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, const VtValue &value) |
virtual SDF_API void | SetDictValueByKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, const SdfAbstractDataConstValue &value) |
virtual SDF_API void | EraseDictValueByKey (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath) |
virtual SDF_API std::vector < TfToken > | ListDictKeys (const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath) const |
Public Member Functions inherited from TfRefBase | |
TfRefBase () | |
TfRefBase (TfRefBase const &) | |
TfRefBase & | operator= (TfRefBase const &) |
size_t | GetCurrentCount () const |
Return the current reference count of this object. More... | |
bool | IsUnique () const |
Return true if only one TfRefPtr points to this object. More... | |
void | SetShouldInvokeUniqueChangedListener (bool shouldCall) |
Public Member Functions inherited from TfWeakBase | |
TfWeakBase () | |
TfWeakBase (const TfWeakBase &) | |
const TfWeakBase & | __GetTfWeakBase__ () const |
const TfWeakBase & | operator= (const TfWeakBase &) |
void | EnableNotification2 () const |
TF_API void const * | GetUniqueIdentifier () const |
Protected Member Functions | |
virtual SDF_API void | _VisitSpecs (SdfAbstractDataSpecVisitor *visitor) const |
Protected Member Functions inherited from TfRefBase | |
virtual TF_API | ~TfRefBase () |
Protected Member Functions inherited from TfWeakBase | |
~TfWeakBase () | |
TfRefPtr< Tf_Remnant > | _Register () const |
template<class T > | |
TfRefPtr< Tf_Remnant > | _Register (T *tempRmnt) const |
bool | _HasRemnant () const |
Additional Inherited Members | |
Public Types inherited from TfRefBase | |
typedef void(* | UniqueChangedFuncPtr )(TfRefBase const *, bool) |
Static Public Member Functions inherited from TfRefBase | |
static TF_API void | SetUniqueChangedListener (UniqueChangedListener listener) |
SdfData provides concrete scene description data storage.
An SdfData is an implementation of SdfAbstractData that simply stores specs and fields in a map keyed by path.
|
virtual |
|
protectedvirtual |
Visits every spec in this SdfAbstractData object with the given visitor
. The order in which specs are visited is undefined. The visitor may not modify the SdfAbstractData object it is visiting. This method should not call Done()
on the visitor.
Implements SdfAbstractData.
|
virtual |
Create a new spec at path with the given specType. If the spec already exists the spec type will be changed.
Implements SdfAbstractData.
Remove the field at path
and fieldName
, if one exists.
Implements SdfAbstractData.
Erase the spec at path and any fields that are on it. Note that this does not erase child specs.
Implements SdfAbstractData.
Implements SdfAbstractData.
|
virtual |
Return the value for the given path and fieldName. Returns an empty value if none is set.
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
Implements SdfAbstractData.
|
virtual |
Return the spec type for the spec at path. Returns SdfSpecTypeUnknown if the spec doesn't exist.
Implements SdfAbstractData.
|
virtual |
Returns whether a value exists for the given path and fieldName. Optionally returns the value if it exists.
Implements SdfAbstractData.
|
virtual |
Return whether a value exists for the given path and fieldName. Optionally returns the value if it exists.
Implements SdfAbstractData.
Return true if this data has a spec for path.
Implements SdfAbstractData.
|
virtual |
Fill specType
(which cannot be nullptr) as if by a call to GetSpecType(path). If the resulting specType is not SdfSpecTypeUnknown, then act as if Has(path, fieldName, value) was called and return its result. In other words, the semantics of this function must be identical to this sequence:
Reimplemented from SdfAbstractData.
|
virtual |
Fill specType
(which cannot be nullptr) as if by a call to GetSpecType(path). If the resulting specType is not SdfSpecTypeUnknown, then act as if Has(path, fieldName, value) was called and return its result. In other words, the semantics of this function must be identical to this sequence:
Reimplemented from SdfAbstractData.
|
virtual |
Returns true if this data object is detached from its serialized data store, false otherwise. A detached data object must not be affected by external changes to the serialized data.
Sdf allows clients to specify detached layers to avoid problems that may occur if the underlying data is modified by an external process. For example, a data object that maintains an open file handle or memory mapping to the original layer on disk and reads data on demand is not detached. But a data object that pulls all of the layer contents into memory is detached.
The default implementation returns !StreamsData(). Non-streaming data objects are assumed to be detached from their serialized data, while streaming objects are conservatively assumed to not be detached. Note that it is possible to have a streaming data object that is also detached – for example, if the data object were to make a private copy of the serialized data for its own use and streamed data from it.
Reimplemented from SdfAbstractData.
Return the names of all the fields that are set at path
.
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
Move the spec at oldPath to newPath, including all the fields that are on it. This does not move any child specs.
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
|
virtual |
Set the value of the given path and fieldName.
It's an error to set a field on a spec that does not exist. Setting a field to an empty VtValue is the same as calling Erase() on it.
Implements SdfAbstractData.
|
virtual |
Set the value of the given path and fieldName.
It's an error to set a field on a spec that does not exist.
Implements SdfAbstractData.
|
virtual |
Implements SdfAbstractData.
|
virtual |
SdfAbstractData overrides.
Implements SdfAbstractData.