SdfData provides concrete scene description data storage. More...
Public Member Functions | |
virtual SDF_API bool | StreamsData () const |
SdfAbstractData overrides. More... | |
virtual SDF_API void | CreateSpec (const SdfPath &path, SdfSpecType specType) |
Create a new spec at path with the given specType. More... | |
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) |
Erase the spec at path and any fields that are on it. More... | |
virtual SDF_API void | MoveSpec (const SdfPath &oldPath, const SdfPath &newPath) |
Move the spec at oldPath to newPath, including all the fields that are on it. More... | |
virtual SDF_API SdfSpecType | GetSpecType (const SdfPath &path) const |
Return the spec type for the spec at path. More... | |
virtual SDF_API bool | Has (const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value) const |
Returns whether a value exists for the given path and fieldName. More... | |
virtual SDF_API bool | Has (const SdfPath &path, const TfToken &fieldName, VtValue *value=NULL) const |
Return whether a value exists for the given path and fieldName. More... | |
virtual SDF_API bool | HasSpecAndField (const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value, SdfSpecType *specType) const |
Fill specType (which cannot be nullptr) as if by a call to GetSpecType(path). More... | |
virtual SDF_API bool | HasSpecAndField (const SdfPath &path, const TfToken &fieldName, VtValue *value, SdfSpecType *specType) const |
Fill specType (which cannot be nullptr) as if by a call to GetSpecType(path). More... | |
virtual SDF_API VtValue | Get (const SdfPath &path, const TfToken &fieldName) const |
Return the value for the given path and fieldName. More... | |
virtual SDF_API void | Set (const SdfPath &path, const TfToken &fieldName, const VtValue &value) |
Set the value of the given path and fieldName. More... | |
virtual SDF_API void | Set (const SdfPath &path, const TfToken &fieldName, const SdfAbstractDataConstValue &value) |
Set the value of the given path and fieldName. More... | |
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 | |
virtual SDF_API void | CopyFrom (const SdfAbstractDataConstPtr &source) |
Copy the data in source into this data object. More... | |
virtual SDF_API bool | IsEmpty () const |
Returns true if this data object has no specs, false otherwise. More... | |
virtual SDF_API bool | Equals (const SdfAbstractDataRefPtr &rhs) const |
Returns true if this data object contains the same specs and fields as lhs, false otherwise. More... | |
virtual SDF_API void | WriteToStream (std::ostream &out) const |
Writes the contents of this data object to out . More... | |
SDF_API void | VisitSpecs (SdfAbstractDataSpecVisitor *visitor) const |
Visits every spec in this SdfAbstractData object with the given visitor . More... | |
virtual SDF_API std::type_info const & | GetTypeid (const SdfPath &path, const TfToken &fieldName) const |
Return the type of the value for fieldName on spec path . More... | |
template<class T > | |
T | GetAs (const SdfPath &path, const TfToken &fieldName, const T &defaultValue=T()) const |
Return the value for the given path and fieldName. More... | |
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 | |
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... | |
const TfRefCount & | GetRefCount () const |
void | SetShouldInvokeUniqueChangedListener (bool shouldCall) |
Public Member Functions inherited from 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 |
Visits every spec in this SdfAbstractData object with the given visitor . More... | |
Protected Member Functions inherited from 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.
|
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.
|
virtual |
Erase the spec at path and any fields that are on it.
Note that this does not erase child specs.
Implements SdfAbstractData.
Return the value for the given path and fieldName.
Returns an empty value if none is set.
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.
|
virtual |
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.
Return the names of all the fields that are set at path
.
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 |
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 |
SdfAbstractData overrides.
Implements SdfAbstractData.