HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
abstractData.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_SDF_ABSTRACT_DATA_H
25 #define PXR_USD_SDF_ABSTRACT_DATA_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/usd/sdf/path.h"
29 #include "pxr/usd/sdf/types.h"
30 
31 #include "pxr/base/vt/value.h"
32 
34 #include "pxr/base/tf/token.h"
35 #include "pxr/base/tf/refBase.h"
36 #include "pxr/base/tf/weakBase.h"
38 
39 #include <vector>
40 #include <type_traits>
41 
43 
48 
49 
50 #define SDF_DATA_TOKENS \
51  ((TimeSamples, "timeSamples"))
52 
54 
55 
56 /// \class SdfAbstractData
57 ///
58 /// Interface for scene description data storage.
59 ///
60 /// This is not a layer. SdfAbstractData is an anonymous container holding
61 /// scene description values. It is like an STL container, but specialized
62 /// for holding scene description.
63 ///
64 /// For any given SdfPath, an SdfAbstractData can hold one or more key/value
65 /// pairs which we call Fields. Most of the API on SdfAbstractData accesses
66 /// or modifies the value stored in a Field for a particular path and field
67 /// name.
68 ///
69 /// SdfAbstractData does not provide undo, change notification, or any strong
70 /// consistency guarantees about the scene description it contains.
71 /// Instead, it is a basis for building those things.
72 ///
73 class SdfAbstractData : public TfRefBase, public TfWeakBase
74 {
75 public:
77  SDF_API
78  virtual ~SdfAbstractData();
79 
80  /// Copy the data in \p source into this data object.
81  ///
82  /// The default implementation does a spec-by-spec, field-by-field
83  /// copy of \p source into this object.
84  SDF_API
85  virtual void CopyFrom(const SdfAbstractDataConstPtr& source);
86 
87  /// Returns true if this data object streams its data to and from its
88  /// serialized data store on demand.
89  ///
90  /// Sdf will treat layers with streaming data differently to avoid pulling
91  /// in data unnecessarily. For example, reloading a streaming layer
92  /// will not perform fine-grained change notification, since doing
93  /// so would require the full contents of the layer to be loaded.
94  SDF_API
95  virtual bool StreamsData() const = 0;
96 
97  /// Returns true if this data object is detached from its serialized
98  /// data store, false otherwise. A detached data object must not be
99  /// affected by external changes to the serialized data.
100  ///
101  /// Sdf allows clients to specify detached layers to avoid problems
102  /// that may occur if the underlying data is modified by an external
103  /// process. For example, a data object that maintains an open file
104  /// handle or memory mapping to the original layer on disk and reads
105  /// data on demand is not detached. But a data object that pulls all
106  /// of the layer contents into memory is detached.
107  ///
108  /// The default implementation returns !StreamsData(). Non-streaming
109  /// data objects are assumed to be detached from their serialized
110  /// data, while streaming objects are conservatively assumed to
111  /// not be detached. Note that it is possible to have a streaming
112  /// data object that is also detached -- for example, if the data
113  /// object were to make a private copy of the serialized data for
114  /// its own use and streamed data from it.
115  SDF_API
116  virtual bool IsDetached() const;
117 
118  /// Returns true if this data object has no specs, false otherwise.
119  ///
120  /// The default implementation uses a visitor to check if any specs
121  /// exist.
122  SDF_API
123  virtual bool IsEmpty() const;
124 
125  /// Returns true if this data object contains the same specs and fields
126  /// as \a lhs, false otherwise.
127  ///
128  /// The default implementation does a spec-by-spec, field-by-field
129  /// comparison.
130  // XXX: What are the right semantics for this?
131  // Does it matter if the underlying implementation matches?
132  SDF_API
133  virtual bool Equals(const SdfAbstractDataRefPtr &rhs) const;
134 
135  /// Writes the contents of this data object to \p out. This is primarily
136  /// for debugging purposes.
137  ///
138  /// The default implementation writes out each field for each spec.
139  SDF_API
140  virtual void WriteToStream(std::ostream& out) const;
141 
142  /// \name Spec API
143  /// @{
144 
145  /// Create a new spec at \a path with the given \a specType. If the spec
146  /// already exists the spec type will be changed.
147  SDF_API
148  virtual void CreateSpec(const SdfPath &path,
149  SdfSpecType specType) = 0;
150 
151  /// Return true if this data has a spec for \a path.
152  SDF_API
153  virtual bool HasSpec(const SdfPath &path) const = 0;
154 
155  /// Erase the spec at \a path and any fields that are on it.
156  /// Note that this does not erase child specs.
157  SDF_API
158  virtual void EraseSpec(const SdfPath &path) = 0;
159 
160  /// Move the spec at \a oldPath to \a newPath, including all the
161  /// fields that are on it. This does not move any child specs.
162  SDF_API
163  virtual void MoveSpec(const SdfPath &oldPath,
164  const SdfPath &newPath) = 0;
165 
166  /// Return the spec type for the spec at \a path. Returns SdfSpecTypeUnknown
167  /// if the spec doesn't exist.
168  virtual SdfSpecType GetSpecType(const SdfPath &path) const = 0;
169 
170  /// Visits every spec in this SdfAbstractData object with the given
171  /// \p visitor. The order in which specs are visited is undefined.
172  /// The visitor may not modify the SdfAbstractData object it is visiting.
173  /// \sa SdfAbstractDataSpecVisitor
174  SDF_API
175  void VisitSpecs(SdfAbstractDataSpecVisitor* visitor) const;
176 
177  /// @}
178 
179  /// \name Field API
180  /// @{
181 
182  /// Returns whether a value exists for the given \a path and \a fieldName.
183  /// Optionally returns the value if it exists.
184  SDF_API
185  virtual bool Has(const SdfPath& path, const TfToken& fieldName,
186  SdfAbstractDataValue* value) const = 0;
187 
188  /// Return whether a value exists for the given \a path and \a fieldName.
189  /// Optionally returns the value if it exists.
190  SDF_API
191  virtual bool Has(const SdfPath& path, const TfToken &fieldName,
192  VtValue *value = NULL) const = 0;
193 
194  /// Fill \p specType (which cannot be nullptr) as if by a call to
195  /// GetSpecType(path). If the resulting specType is not SdfSpecTypeUnknown,
196  /// then act as if Has(path, fieldName, value) was called and return its
197  /// result. In other words, the semantics of this function must be
198  /// identical to this sequence:
199  ///
200  /// \code
201  /// *specType = GetSpecType(path);
202  /// return *specType != SdfSpecTypeUnknown && Has(path, fieldName, value);
203  /// \endcode
204  SDF_API
205  virtual bool
206  HasSpecAndField(const SdfPath &path, const TfToken &fieldName,
207  SdfAbstractDataValue *value, SdfSpecType *specType) const;
208 
209  /// Fill \p specType (which cannot be nullptr) as if by a call to
210  /// GetSpecType(path). If the resulting specType is not SdfSpecTypeUnknown,
211  /// then act as if Has(path, fieldName, value) was called and return its
212  /// result. In other words, the semantics of this function must be
213  /// identical to this sequence:
214  ///
215  /// \code
216  /// *specType = GetSpecType(path);
217  /// return *specType != SdfSpecTypeUnknown && Has(path, fieldName, value);
218  /// \endcode
219  SDF_API
220  virtual bool
221  HasSpecAndField(const SdfPath &path, const TfToken &fieldName,
222  VtValue *value, SdfSpecType *specType) const;
223 
224  /// Return the value for the given \a path and \a fieldName. Returns an
225  /// empty value if none is set.
226  SDF_API
227  virtual VtValue Get(const SdfPath& path,
228  const TfToken& fieldName) const = 0;
229 
230  /// Return the type of the value for \p fieldName on spec \p path. If no
231  /// such field exists, return typeid(void). Derived classes may optionally
232  /// override this for performance. The base implementation is equivalent
233  /// to:
234  ///
235  /// \code
236  /// return Get(path, fieldName).GetTypeid();
237  /// \endcode
238  SDF_API
239  virtual std::type_info const &
240  GetTypeid(const SdfPath &path, const TfToken &fieldName) const;
241 
242  /// Set the value of the given \a path and \a fieldName.
243  ///
244  /// It's an error to set a field on a spec that does not exist. Setting a
245  /// field to an empty VtValue is the same as calling Erase() on it.
246  SDF_API
247  virtual void Set(const SdfPath &path, const TfToken &fieldName,
248  const VtValue &value) = 0;
249 
250  /// Set the value of the given \a path and \a fieldName.
251  ///
252  /// It's an error to set a field on a spec that does not exist.
253  SDF_API
254  virtual void Set(const SdfPath &path, const TfToken &fieldName,
255  const SdfAbstractDataConstValue& value) = 0;
256 
257  /// Remove the field at \p path and \p fieldName, if one exists.
258  SDF_API
259  virtual void Erase(const SdfPath& path,
260  const TfToken& fieldName) = 0;
261 
262  /// Return the names of all the fields that are set at \p path.
263  SDF_API
264  virtual std::vector<TfToken> List(const SdfPath& path) const = 0;
265 
266  /// Return the value for the given \a path and \a fieldName. Returns the
267  /// provided \a defaultValue value if none is set.
268  template <class T>
269  inline T GetAs(const SdfPath& path, const TfToken& fieldName,
270  const T& defaultValue = T()) const;
271 
272  /// @}
273 
274 
275  /// \name Dict key access API
276  /// @{
277 
278  // Return true and set \p value (if non null) if the field identified by
279  // \p path and \p fieldName is dictionary-valued, and if there is an element
280  // at \p keyPath in that dictionary. Return false otherwise. If
281  // \p keyPath names an entire sub-dictionary, set \p value to that entire
282  // sub-dictionary and return true.
283  SDF_API
284  virtual bool HasDictKey(const SdfPath& path,
285  const TfToken &fieldName,
286  const TfToken &keyPath,
287  SdfAbstractDataValue* value) const;
288  SDF_API
289  virtual bool HasDictKey(const SdfPath& path,
290  const TfToken &fieldName,
291  const TfToken &keyPath,
292  VtValue *value = NULL) const;
293 
294  // Same as HasDictKey but return empty VtValue on failure.
295  SDF_API
296  virtual VtValue GetDictValueByKey(const SdfPath& path,
297  const TfToken &fieldName,
298  const TfToken &keyPath) const;
299 
300  // Set the element at \p keyPath in the dictionary-valued field identified
301  // by \p path and \p fieldName. If the field itself is not
302  // dictionary-valued, replace the field with a new dictionary and set the
303  // element at \p keyPath in it. If \p value is empty, invoke
304  // EraseDictValueByKey instead.
305  SDF_API
306  virtual void SetDictValueByKey(const SdfPath& path,
307  const TfToken &fieldName,
308  const TfToken &keyPath,
309  const VtValue &value);
310  SDF_API
311  virtual void SetDictValueByKey(const SdfPath& path,
312  const TfToken &fieldName,
313  const TfToken &keyPath,
315 
316  // If \p path and \p fieldName identify a dictionary-valued field with an
317  // element at \p keyPath, remove that element from the dictionary. If this
318  // leaves the dictionary empty, Erase() the entire field.
319  SDF_API
320  virtual void EraseDictValueByKey(const SdfPath& path,
321  const TfToken &fieldName,
322  const TfToken &keyPath);
323 
324  // If \p path, \p fieldName, and \p keyPath identify a (sub) dictionary,
325  // return a vector of the keys in that dictionary, otherwise return an empty
326  // vector.
327  SDF_API
328  virtual std::vector<TfToken> ListDictKeys(const SdfPath& path,
329  const TfToken &fieldName,
330  const TfToken &keyPath) const;
331 
332 
333  /// @}
334 
335 
336  /// \name Time-sample API
337  ///
338  /// This API supports narrowly-targeted queries against the
339  /// "timeSamples" key of properties. In particular, it enables
340  /// asking for single time samples without pulling on the entire
341  /// set of time samples, as well as asking about the set of sample
342  /// times without pulling on the actual values at those times.
343  ///
344  /// @{
345 
346  SDF_API
347  virtual std::set<double>
348  ListAllTimeSamples() const = 0;
349 
350  SDF_API
351  virtual std::set<double>
352  ListTimeSamplesForPath(const SdfPath& path) const = 0;
353 
354  SDF_API
355  virtual bool
356  GetBracketingTimeSamples(double time, double* tLower, double* tUpper) const = 0;
357 
358  SDF_API
359  virtual size_t
360  GetNumTimeSamplesForPath(const SdfPath& path) const = 0;
361 
362  SDF_API
363  virtual bool
365  double time,
366  double* tLower, double* tUpper) const = 0;
367 
368  SDF_API
369  virtual bool
370  QueryTimeSample(const SdfPath& path, double time,
371  VtValue *optionalValue = NULL) const = 0;
372  SDF_API
373  virtual bool
374  QueryTimeSample(const SdfPath& path, double time,
375  SdfAbstractDataValue *optionalValue) const = 0;
376 
377  SDF_API
378  virtual void
379  SetTimeSample(const SdfPath& path, double time,
380  const VtValue & value) = 0;
381 
382  SDF_API
383  virtual void
384  EraseTimeSample(const SdfPath& path, double time) = 0;
385 
386  /// @}
387 
388 protected:
389  /// Visits every spec in this SdfAbstractData object with the given
390  /// \p visitor. The order in which specs are visited is undefined.
391  /// The visitor may not modify the SdfAbstractData object it is visiting.
392  /// This method should \b not call \c Done() on the visitor.
393  /// \sa SdfAbstractDataSpecVisitor
394  SDF_API
395  virtual void _VisitSpecs(SdfAbstractDataSpecVisitor* visitor) const = 0;
396 };
397 
398 template <class T>
400  const SdfPath& path,
401  const TfToken& field, const T& defaultVal) const
402 {
403  VtValue val = Get(path, field);
404  if (val.IsHolding<T>()) {
405  return val.UncheckedGet<T>();
406  }
407  return defaultVal;
408 }
409 
410 /// \class SdfAbstractDataValue
411 ///
412 /// A type-erased container for a field value in an SdfAbstractData.
413 ///
414 /// \sa SdfAbstractDataTypedValue
416 {
417 public:
418  virtual bool StoreValue(const VtValue& value) = 0;
419  virtual bool StoreValue(VtValue &&value) = 0;
420 
421  template <class T>
422  bool StoreValue(const T& v)
423  {
424  if (TfSafeTypeCompare(typeid(T), valueType)) {
425  *static_cast<T*>(value) = v;
426  return true;
427  }
428  typeMismatch = true;
429  return false;
430  }
431 
432  bool StoreValue(const SdfValueBlock& block)
433  {
434  isValueBlock = true;
435  return true;
436  }
437 
438  void* value;
439  const std::type_info& valueType;
442 
443 protected:
444  SdfAbstractDataValue(void* value_, const std::type_info& valueType_)
445  : value(value_)
446  , valueType(valueType_)
447  , isValueBlock(false)
448  , typeMismatch(false)
449  { }
450 };
451 
452 /// \class SdfAbstractDataTypedValue
453 ///
454 /// The fully-typed container for a field value in an \c SdfAbstractData.
455 /// An \c SdfAbstractDataTypedValue allows a consumer to pass a pointer to
456 /// an object through the virtual \c SdfAbstractData interface along with
457 /// information about that object's type. That information may allow
458 /// implementations of \c SdfAbstractData to populate the contained object
459 /// in a more efficient way, avoiding unnecessary boxing/unboxing of data.
460 ///
461 /// SdfAbstractDataTypedValue objects are intended to be transient; they
462 /// are solely used to get pointer information into and out of an
463 /// SdfAbstractData container.
464 ///
465 template <class T>
467 {
468 public:
470  : SdfAbstractDataValue(value, typeid(T))
471  { }
472 
473  virtual bool StoreValue(const VtValue& v) override
474  {
475  if (ARCH_LIKELY(v.IsHolding<T>())) {
476  *static_cast<T*>(value) = v.UncheckedGet<T>();
478  isValueBlock = true;
479  }
480  return true;
481  }
482 
483  if (v.IsHolding<SdfValueBlock>()) {
484  isValueBlock = true;
485  return true;
486  }
487 
488  typeMismatch = true;
489 
490  return false;
491  }
492 
493  virtual bool StoreValue(VtValue &&v) override
494  {
495  if (ARCH_LIKELY(v.IsHolding<T>())) {
496  *static_cast<T*>(value) = v.UncheckedRemove<T>();
498  isValueBlock = true;
499  }
500  return true;
501  }
502 
503  if (v.IsHolding<SdfValueBlock>()) {
504  isValueBlock = true;
505  return true;
506  }
507 
508  typeMismatch = true;
509 
510  return false;
511  }
512 };
513 
514 /// \class SdfAbstractDataConstValue
515 ///
516 /// A type-erased container for a const field value in an SdfAbstractData.
517 ///
518 /// \sa SdfAbstractDataConstTypedValue
520 {
521 public:
522  virtual bool GetValue(VtValue* value) const = 0;
523 
524  template <class T> bool GetValue(T* v) const
525  {
526  if (TfSafeTypeCompare(typeid(T), valueType)) {
527  *v = *static_cast<const T*>(value);
528  return true;
529  }
530  return false;
531  }
532 
533  virtual bool IsEqual(const VtValue& value) const = 0;
534 
535  const void* value;
536  const std::type_info& valueType;
537 
538 protected:
539  SdfAbstractDataConstValue(const void* value_,
540  const std::type_info& valueType_)
541  : value(value_)
542  , valueType(valueType_)
543  {
544  }
545 };
546 
547 /// \class SdfAbstractDataConstTypedValue
548 ///
549 /// The fully-typed container for a field value in an \c SdfAbstractData.
550 /// An \c SdfAbstractDataConstTypedValue allows a consumer to pass a pointer to
551 /// an object through the virtual \c SdfAbstractData interface along with
552 /// information about that object's type. That information may allow
553 /// implementations of \c SdfAbstractData to store the contained object
554 /// in a more efficient way, avoiding unnecessary boxing/unboxing of data.
555 ///
556 /// SdfAbstractDataConstTypedValue objects are intended to be transient; they
557 /// are solely used to get pointer information into an SdfAbstractData
558 /// container.
559 ///
560 template <class T>
562 {
563 public:
565  : SdfAbstractDataConstValue(value, typeid(T))
566  { }
567 
568  virtual bool GetValue(VtValue* v) const
569  {
570  *v = _GetValue();
571  return true;
572  }
573 
574  virtual bool IsEqual(const VtValue& v) const
575  {
576  return (v.IsHolding<T>() && v.UncheckedGet<T>() == _GetValue());
577  }
578 
579 private:
580  const T& _GetValue() const
581  {
582  return *static_cast<const T*>(value);
583  }
584 };
585 
586 // Specialization of SdAbstractDataConstTypedValue that converts character
587 // arrays to std::string.
588 template <int N>
590  : public SdfAbstractDataConstTypedValue<std::string>
591 {
592 public:
593  typedef char CharArray[N];
596  , _str(*value)
597  { }
598 
599 private:
600  std::string _str;
601 };
602 
603 /// \class SdfAbstractDataSpecVisitor
604 ///
605 /// Base class for objects used to visit specs in an SdfAbstractData object.
606 ///
607 /// \sa SdfAbstractData::VisitSpecs.
609 {
610 public:
611  SDF_API
612  virtual ~SdfAbstractDataSpecVisitor();
613 
614  /// \c SdfAbstractData::VisitSpecs calls this function for every entry it
615  /// contains, passing itself as \p data and the entry's \p path. Return
616  /// false to stop iteration early, true to continue.
617  SDF_API
618  virtual bool VisitSpec(const SdfAbstractData& data,
619  const SdfPath& path) = 0;
620 
621  /// \c SdfAbstractData::VisitSpecs will call this after visitation is
622  /// complete, even if some \c VisitSpec() returned \c false.
623  SDF_API
624  virtual void Done(const SdfAbstractData& data) = 0;
625 };
626 
628 
629 #endif // PXR_USD_SDF_ABSTRACT_DATA_H
#define ARCH_LIKELY(x)
Definition: hints.h:46
virtual bool GetValue(VtValue *v) const
Definition: abstractData.h:568
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)
Definition: abstractData.h:594
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 &
Definition: value.h:1121
virtual SDF_API size_t GetNumTimeSamplesForPath(const SdfPath &path) const =0
virtual SDF_API void CopyFrom(const SdfAbstractDataConstPtr &source)
bool StoreValue(const SdfValueBlock &block)
Definition: abstractData.h:432
SdfAbstractDataConstValue(const void *value_, const std::type_info &valueType_)
Definition: abstractData.h:539
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
const GLdouble * v
Definition: glcorearb.h:837
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
GLsizei const GLfloat * value
Definition: glcorearb.h:824
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
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
Definition: abstractData.h:473
const std::type_info & valueType
Definition: abstractData.h:536
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
Definition: abstractData.h:399
Definition: token.h:87
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_)
Definition: abstractData.h:444
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)
Definition: abstractData.h:469
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
Definition: glcorearb.h:803
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
Definition: path.h:290
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
Definition: abstractData.h:493
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
#define SDF_API
Definition: api.h:40
const std::type_info & valueType
Definition: abstractData.h:439
virtual SDF_API void EraseDictValueByKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
bool GetValue(T *v) const
Definition: abstractData.h:524
SdfSpecType
Definition: types.h:85
virtual bool IsEqual(const VtValue &v) const
Definition: abstractData.h:574
bool IsHolding() const
Definition: value.h:1081
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
GA_API const UT_StringHolder N
virtual SDF_API void _VisitSpecs(SdfAbstractDataSpecVisitor *visitor) const =0
#define SDF_DATA_TOKENS
Definition: abstractData.h:50
bool StoreValue(const T &v)
Definition: abstractData.h:422
virtual SDF_API void SetDictValueByKey(const SdfPath &path, const TfToken &fieldName, const TfToken &keyPath, const VtValue &value)
Definition: core.h:1131
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)
Definition: abstractData.h:564
virtual SDF_API ~SdfAbstractDataSpecVisitor()
Definition: value.h:164
Definition: format.h:895
virtual SdfSpecType GetSpecType(const SdfPath &path) const =0