24 #ifndef PXR_USD_SDF_ABSTRACT_DATA_H
25 #define PXR_USD_SDF_ABSTRACT_DATA_H
40 #include <type_traits>
50 #define SDF_DATA_TOKENS \
51 ((TimeSamples, "timeSamples"))
133 virtual bool Equals(
const SdfAbstractDataRefPtr &rhs)
const;
228 const TfToken& fieldName)
const = 0;
239 virtual std::type_info
const &
270 const T& defaultValue =
T())
const;
347 virtual std::set<double>
351 virtual std::set<double>
366 double* tLower,
double* tUpper)
const = 0;
371 VtValue *optionalValue = NULL)
const = 0;
401 const TfToken& field,
const T& defaultVal)
const
425 *
static_cast<T*
>(
value) = v;
496 *
static_cast<T*
>(
value) =
v.UncheckedRemove<
T>();
527 *v = *
static_cast<const T*
>(
value);
540 const std::type_info& valueType_)
580 const T& _GetValue()
const
582 return *
static_cast<const T*
>(
value);
593 typedef char CharArray[
N];
629 #endif // PXR_USD_SDF_ABSTRACT_DATA_H
virtual bool GetValue(VtValue *v) const
virtual SDF_API bool IsEmpty() const
virtual SDF_API std::vector< TfToken > ListDictKeys(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath) const
SdfAbstractDataConstTypedValue(const CharArray *value)
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_AND_REF_PTRS(SdfAbstractData)
virtual SDF_API bool Has(const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value) const =0
T const & UncheckedGet() const &
virtual SDF_API size_t GetNumTimeSamplesForPath(const SdfPath &path) const =0
virtual SDF_API void CopyFrom(const SdfAbstractDataConstPtr &source)
bool StoreValue(const SdfValueBlock &block)
SdfAbstractDataConstValue(const void *value_, const std::type_info &valueType_)
virtual SDF_API void CreateSpec(const SdfPath &path, SdfSpecType specType)=0
virtual SDF_API bool HasSpecAndField(const SdfPath &path, const TfToken &fieldName, SdfAbstractDataValue *value, SdfSpecType *specType) const
GT_API const UT_StringHolder time
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
virtual SDF_API ~SdfAbstractData()
virtual SDF_API bool HasDictKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, SdfAbstractDataValue *value) const
virtual bool StoreValue(const VtValue &v) override
const std::type_info & valueType
virtual SDF_API std::set< double > ListAllTimeSamples() const =0
virtual bool IsEqual(const VtValue &value) const =0
virtual SDF_API bool GetBracketingTimeSamplesForPath(const SdfPath &path, double time, double *tLower, double *tUpper) const =0
virtual SDF_API std::set< double > ListTimeSamplesForPath(const SdfPath &path) const =0
virtual SDF_API void WriteToStream(std::ostream &out) const
virtual SDF_API void EraseSpec(const SdfPath &path)=0
virtual SDF_API std::vector< TfToken > List(const SdfPath &path) const =0
Return the names of all the fields that are set at path.
T GetAs(const SdfPath &path, const TfToken &fieldName, const T &defaultValue=T()) const
SDF_API void VisitSpecs(SdfAbstractDataSpecVisitor *visitor) const
virtual SDF_API VtValue Get(const SdfPath &path, const TfToken &fieldName) const =0
virtual SDF_API VtValue GetDictValueByKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath) const
SdfAbstractDataValue(void *value_, const std::type_info &valueType_)
virtual SDF_API void Erase(const SdfPath &path, const TfToken &fieldName)=0
Remove the field at path and fieldName, if one exists.
SdfAbstractDataTypedValue(T *value)
TF_DECLARE_PUBLIC_TOKENS(SdfDataTokens, SDF_API, SDF_DATA_TOKENS)
virtual SDF_API bool VisitSpec(const SdfAbstractData &data, const SdfPath &path)=0
virtual SDF_API bool IsDetached() const
GLsizei GLsizei GLchar * source
virtual bool GetValue(VtValue *value) const =0
virtual SDF_API void EraseTimeSample(const SdfPath &path, double time)=0
virtual SDF_API bool Equals(const SdfAbstractDataRefPtr &rhs) const
virtual SDF_API bool StreamsData() const =0
virtual SDF_API bool GetBracketingTimeSamples(double time, double *tLower, double *tUpper) const =0
virtual bool StoreValue(const VtValue &value)=0
virtual SDF_API std::type_info const & GetTypeid(const SdfPath &path, const TfToken &fieldName) const
virtual SDF_API void Done(const SdfAbstractData &data)=0
virtual bool StoreValue(VtValue &&v) override
virtual SDF_API bool QueryTimeSample(const SdfPath &path, double time, VtValue *optionalValue=NULL) const =0
virtual SDF_API void Set(const SdfPath &path, const TfToken &fieldName, const VtValue &value)=0
const std::type_info & valueType
virtual SDF_API void EraseDictValueByKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
bool GetValue(T *v) const
virtual bool IsEqual(const VtValue &v) const
#define PXR_NAMESPACE_CLOSE_SCOPE
GA_API const UT_StringHolder N
virtual SDF_API void _VisitSpecs(SdfAbstractDataSpecVisitor *visitor) const =0
bool StoreValue(const T &v)
virtual SDF_API void SetDictValueByKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, const VtValue &value)
virtual SDF_API void MoveSpec(const SdfPath &oldPath, const SdfPath &newPath)=0
virtual SDF_API void SetTimeSample(const SdfPath &path, double time, const VtValue &value)=0
PXR_NAMESPACE_OPEN_SCOPE bool TfSafeTypeCompare(const std::type_info &t1, const std::type_info &t2)
virtual SDF_API bool HasSpec(const SdfPath &path) const =0
Return true if this data has a spec for path.
SdfAbstractDataConstTypedValue(const T *value)
virtual SDF_API ~SdfAbstractDataSpecVisitor()
virtual SdfSpecType GetSpecType(const SdfPath &path) const =0