HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_Handle.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GA_Handle.h ( GA Library, C++)
7  *
8  * COMMENTS: A lightweight probe to deal with specific attributes of
9  * a specific type.
10  */
11 
12 #pragma once
13 
14 #ifndef __GA_Handle__
15 #define __GA_Handle__
16 
17 #include "GA_API.h"
18 
19 #include "GA_ATINumeric.h"
20 #include "GA_PageArray.h"
21 
22 #include "GA_AIFNumericArray.h"
25 #include "GA_AIFSharedDictArray.h"
26 #include "GA_AIFSharedDictTuple.h"
27 #include "GA_AIFTuple.h"
28 #include "GA_ATIString.h"
29 #include "GA_ATIDict.h"
30 #include "GA_OffsetList.h"
31 #include "GA_Types.h"
32 
33 #if UT_ASSERT_LEVEL >= UT_ASSERT_LEVEL_PARANOID
34 #include "GA_IndexMap.h"
35 #endif
36 
37 #include <UT/UT_Assert.h>
38 #include <UT/UT_FixedVector.h>
39 #include <UT/UT_Matrix2.h>
40 #include <UT/UT_Matrix3.h>
41 #include <UT/UT_Matrix4.h>
42 #include <UT/UT_Quaternion.h>
43 #include <UT/UT_Storage.h>
44 #include <UT/UT_StringHolder.h>
45 #include <UT/UT_Vector2.h>
46 #include <UT/UT_Vector3.h>
47 #include <UT/UT_Vector4.h>
48 #include <UT/UT_VectorTypes.h>
49 
50 #include <SYS/SYS_Inline.h>
51 #include <SYS/SYS_Types.h>
52 #include <SYS/SYS_TypeTraits.h>
53 
54 
55 class GA_Attribute;
56 class GA_Detail;
57 class GA_Range;
58 class UT_StringArray;
59 
60 
61 namespace {
62 
63 class ga_OffsetToIndexTrivial
64 {
65 public:
66  ga_OffsetToIndexTrivial(GA_Offset start)
67  : myStartOffset(start)
68  {
69  }
70 
72  {
73  return GA_Index((GA_Size)(offset - myStartOffset));
74  }
75 
76 protected:
77  const GA_Offset myStartOffset;
78 
79 };
80 
81 class ga_OffsetToIndex
82 {
83 public:
84  ga_OffsetToIndex(GA_Offset startoff, const GA_ListType<GA_Offset, GA_Index> &offtoindex)
85  : myStartIndex(offtoindex(startoff))
86  , myOffsetToIndex(offtoindex)
87  {
88  }
89 
90  GA_Index operator()(GA_Offset offset) const
91  {
92  return myOffsetToIndex(offset) - myStartIndex;
93  }
94 
95 protected:
96  const GA_Index myStartIndex;
97  const GA_ListType<GA_Offset, GA_Index> &myOffsetToIndex;
98 };
99 
100 }
101 
102 /// Read-only handle for vector attribute data.
103 ///
104 /// @tparam T Return vector type for get methods. Requires T::value_type to
105 /// describe the underlying element type of the vector.
106 ///
107 /// @tparam ENABLE Use SYS_EnableIf to specialize arithmetic template
108 /// implementations (i.e. see the SCALAR implementation)
109 ///
110 template <typename T, typename ENABLE = void>
112 {
113 public:
115  typedef typename T::value_type BASETYPE;
119 
121  {
122  clear();
123  }
124  GA_ROHandleT(const GA_Attribute *attrib)
125  {
126  bind(attrib);
127  }
128  GA_ROHandleT(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
129 
130  void operator=(const GA_Attribute *attrib)
131  {
132  bind(attrib);
133  }
134 
135  void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
136 
138  void bind(const GA_Attribute *attrib, int minsize=1)
139  {
140  bind(GA_ATINumeric::cast(attrib), minsize);
141  }
142 
143  void bind(const GA_ATINumeric *attrib, int minsize=1)
144  {
145  myExactMatch = nullptr;
146  myAlmostMatch = nullptr;
147  myAttrib = SYSconst_cast(attrib);
148  if (!myAttrib)
149  return;
150 
151  int actual_tuple_size = myAttrib->getTupleSize();
152  if (actual_tuple_size < minsize * theTupleSize)
153  {
154  myAttrib = nullptr;
155  return;
156  }
157 
158  if (actual_tuple_size == theTupleSize)
159  {
160  UT_Storage actual_storage = myAttrib->getData().Base::getStorage();
161  if (actual_storage == UT_StorageNum<BASETYPE>::theStorage)
162  myExactMatch = &myAttrib->getData().castType<BASETYPE>().template castTupleSize<theTupleSize>();
163  else if (actual_storage == UT_StorageNum<typename UT_StorageNum<BASETYPE>::SecondGuess>::theStorage)
164  myAlmostMatch = &myAttrib->getData().castType<typename UT_StorageNum<BASETYPE>::SecondGuess>().template castTupleSize<theTupleSize>();
165  }
166  }
167 
168  const GA_ATINumeric *getAttribute() const { return myAttrib; }
169 
171  { if (myAttrib) SYSconst_cast(myAttrib)->flushCECaches(); }
173  { if (myAttrib) SYSconst_cast(myAttrib)->flushCEWriteCaches(); }
174 
176  {
177  if (myAttrib)
178  return myAttrib->getDataId();
179  return GA_INVALID_DATAID;
180  }
181 
182 
183  // Check whether the attribute is GA_TYPE_HPOINT
184  bool isRational() const
185  { return myAttrib->getTypeInfo() == GA_TYPE_HPOINT; }
186 
187  void clear()
188  {
189  myAttrib = nullptr;
190  myExactMatch = nullptr;
191  myAlmostMatch = nullptr;
192  }
193 
195  {
196  return myAttrib;
197  }
199  {
200  return !myAttrib;
201  }
202 
203  /// True if we've bound the Almost match, which we consider our alternate
204  /// binding.
206  {
207  return myAlmostMatch != nullptr;
208  }
209 
210  SYS_FORCE_INLINE T get(GA_Offset off, int comp=0) const
211  {
212  UT_ASSERT_P(comp == 0 &&
213  "Component offset not currently supported for vector/matrix types");
215  UT_ASSERT_P(GAisValid(off));
217 
218  if (myExactMatch)
219  return UT_FromFixed<T>{}(myExactMatch->template getVector<BASETYPE,theTupleSize>(off));
220  return getNonInlinePart(off);
221  }
222 
223  SYS_FORCE_INLINE ALTTYPE getAlt(GA_Offset off, int comp=0) const
224  {
225  UT_ASSERT_P(comp == 0 &&
226  "Component offset not currently supported for vector/matrix types");
228  UT_ASSERT_P(GAisValid(off));
230 
231  if (myAlmostMatch)
232  return ALTTYPE(myAlmostMatch->template getVector<ALTBASETYPE,theTupleSize>(off));
233  return ALTTYPE(getAltNonInlinePart(off));
234  }
235 private:
236  T getNonInlinePart(GA_Offset off) const
237  {
238  if (myAlmostMatch)
239  return UT_FromFixed<T>{}(myAlmostMatch->template getVector<BASETYPE,theTupleSize>(off));
240  return getOutlinePart(off);
241  }
242 
243  // Outline the expensive template instantiations from UT_PageArray when the
244  // attribute is not a match for our type (or the fallback type).
245  T getOutlinePart(GA_Offset off) const;
246 
247  ALTTYPE getAltNonInlinePart(GA_Offset off) const
248  {
249  if (myExactMatch)
250  return ALTTYPE(myExactMatch->template getVector<ALTBASETYPE,theTupleSize>(off));
251  return getAltOutlinePart(off);
252  }
253 
254  ALTTYPE getAltOutlinePart(GA_Offset off) const;
255 
256 public:
257 
258  /// Copies attribute values from a contiguous block of offsets
259  /// into the dest array.
260  /// NOTE: The block of offsets is assumed to have no holes, else
261  /// data could be read from offsets that don't have
262  /// corresponding elements.
263  void getBlock(GA_Offset startoff, GA_Size nelements, T *dest, int deststride = 1, int component = 0) const;
264 
265  /// Copies attribute values from a contiguous block of indices
266  /// into the dest array.
267  /// This allows there to be holes in the geometry.
268  void getBlockFromIndices(GA_Index startidx, GA_Size nelements, T *dest, int deststride = 1, int component = 0) const;
269 
271  {
272  return get(off);
273  }
275  {
276  return get(off);
277  }
278  /// Returns true iff the specified page is constant-compressed,
279  /// where a single value is stored to represent GA_PAGE_SIZE
280  /// values in the page, (or possibly fewer if only one page).
282  {
283  return myAttrib->isPageConstant(pagenum);
284  }
285  bool operator==(const GA_ROHandleT<T> &handle) const
286  {
287  return myAttrib == handle.myAttrib;
288  }
289  bool operator!=(const GA_ROHandleT<T> &handle) const
290  {
291  return myAttrib != handle.myAttrib;
292  }
293  const GA_ATINumeric *operator->() const
294  {
295  return myAttrib;
296  }
297 protected:
301 };
302 
303 /// Read-write handle for vector attribute data.
304 ///
305 /// @tparam T Return vector type for get methods. Requires T::value_type to
306 /// describe the underlying element type of the vector.
307 ///
308 template <typename T, typename ENABLE = void>
309 class GA_RWHandleT : public GA_ROHandleT<T, ENABLE>
310 {
311 public:
312  typedef void (*GAprobeAttribSetter)(GA_Attribute *atr, GA_Offset, const T &);
314  typedef typename T::value_type BASETYPE;
315 private:
316  using Base::myAttrib;
317  using Base::myExactMatch;
318  using Base::myAlmostMatch;
319  using Base::theTupleSize;
320 public:
323 
325  {
326  clear();
327  }
329  {
330  bind(attrib);
331  }
332  GA_RWHandleT(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
333 
334  void operator=(GA_Attribute *attrib)
335  {
336  bind(attrib);
337  }
338 
339  void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
340 
342  void bind(GA_Attribute *attrib, int minsize=1)
343  {
344  bind(GA_ATINumeric::cast(attrib), minsize);
345  }
347  void bind(GA_ATINumeric *attrib, int minsize=1)
348  {
349  Base::bind(attrib, minsize);
350  }
351 
352  using Base::clear;
353  using Base::flushCECaches;
355 
356  GA_ATINumeric *getAttribute() const { return myAttrib; }
357 
358  void bumpDataId() const
359  {
360  if (myAttrib)
361  myAttrib->bumpDataId();
362  }
363 
365  {
366  if (myAttrib)
367  return myAttrib->getDataId();
368  return GA_INVALID_DATAID;
369  }
370 
371  SYS_FORCE_INLINE void set(GA_Offset off, const T &val) const
372  {
374  UT_ASSERT_P(GAisValid(off));
376  if (myExactMatch)
377  myExactMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
378  else if (myAlmostMatch)
379  myAlmostMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
380  else
381  setOutlinePart(off, val);
382  }
383 
384  SYS_FORCE_INLINE void setAlt(GA_Offset off, const ALTTYPE &val) const
385  {
387  UT_ASSERT_P(GAisValid(off));
389  if (myAlmostMatch)
390  myAlmostMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
391  else if (myExactMatch)
392  myExactMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
393  else
394  setAltOutlinePart(off, val);
395  }
396 
397  SYS_FORCE_INLINE void set(GA_Offset off, int comp, const T &val) const
398  {
399  UT_ASSERT(comp == 0 && "Component sets on vector types unsupported");
401  UT_ASSERT_P(GAisValid(off));
403  if (myExactMatch)
404  myExactMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
405  else if (myAlmostMatch)
406  myAlmostMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
407  else
408  myAttrib->getData().setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
409  }
410 
411  SYS_FORCE_INLINE void setAlt(GA_Offset off, int comp, const ALTTYPE &val) const
412  {
413  UT_ASSERT(comp == 0 && "Component sets on vector types unsupported");
415  UT_ASSERT_P(GAisValid(off));
417  if (myAlmostMatch)
418  myAlmostMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
419  else if (myExactMatch)
420  myExactMatch->setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
421  else
422  myAttrib->getData().setVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
423  }
424 
425  SYS_FORCE_INLINE void add(GA_Offset off, const T &val) const
426  {
428  UT_ASSERT_P(GAisValid(off));
430  if (myExactMatch)
431  myExactMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
432  else if (myAlmostMatch)
433  myAlmostMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
434  else
435  addOutlinePart(off, val);
436  }
437 
438  SYS_FORCE_INLINE void addAlt(GA_Offset off, const ALTTYPE &val) const
439  {
441  UT_ASSERT_P(GAisValid(off));
443  if (myAlmostMatch)
444  myAlmostMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
445  else if (myExactMatch)
446  myExactMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
447  else
448  addAltOutlinePart(off, val);
449  }
450 
451  SYS_FORCE_INLINE void add(GA_Offset off, int comp, const T &val) const
452  {
453  UT_ASSERT(comp == 0 && "Component sets on vector types unsupported");
455  UT_ASSERT_P(GAisValid(off));
457  if (myExactMatch)
458  myExactMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
459  else if (myAlmostMatch)
460  myAlmostMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
461  else
462  myAttrib->getData().addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<T>::FixedVectorType &>(val));
463  }
464 
465  SYS_FORCE_INLINE void addAlt(GA_Offset off, int comp, const ALTTYPE &val) const
466  {
467  UT_ASSERT(comp == 0 && "Component sets on vector types unsupported");
469  UT_ASSERT_P(GAisValid(off));
471  if (myAlmostMatch)
472  myAlmostMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
473  else if (myExactMatch)
474  myExactMatch->addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
475  else
476  myAttrib->getData().addVector(off, reinterpret_cast<const typename UT_FixedVectorTraits<ALTTYPE>::FixedVectorType &>(val));
477  }
478 
479  /// Copies attribute values from the source array into a contiguous
480  /// block of offsets.
481  /// NOTE: The block of offsets is assumed to have no holes, else
482  /// data could be written to offsets that don't have
483  /// corresponding elements.
484  void setBlock(GA_Offset startoff, GA_Size nelements, const T *source, int sourcestride = 1, int component = 0) const;
485 
486  void setBlockFromIndices(GA_Index startidx, GA_Size nelements, const T *source, int sourcestride = 1, int component = 0) const;
487 
488  void makeConstant(const T &cval) const
489  {
491  myAttrib->getAIFTuple()->makeConstant(myAttrib, &cval.data()[0], sizeof(T)/sizeof(BASETYPE), 0);
492  }
493 
494  /// Sets all components of all elements of the specified page to
495  /// the given values.
496  /// NOTE: The length of values must be equal to the tuple size.
497  void setPageConstant(GA_PageNum pagenum, const BASETYPE *values) const
498  {
499  if (myExactMatch)
500  myExactMatch->setPageConstant(pagenum, values);
501  else if (myAlmostMatch)
502  myAlmostMatch->setPageConstant(pagenum, values);
503  else
504  myAttrib->getData().setPageConstant(pagenum, values);
505  }
506 
508  {
509  return myAttrib;
510  }
511 
512 private:
513  void setOutlinePart(GA_Offset off, const T &val) const;
514  void setAltOutlinePart(GA_Offset off, const ALTTYPE &val) const;
515  void addOutlinePart(GA_Offset off, const T &val) const;
516  void addAltOutlinePart(GA_Offset off, const ALTTYPE &val) const;
517 };
518 
519 /// Simplify checking for scalar types
520 #define SCALAR(T) SYS_EnableIf< SYS_IsArithmetic<T>::value >::type
521 
522 /// Read-only handle for scalar attribute data.
523 ///
524 /// @tparam T Return type for get methods
525 ///
526 template <typename T>
527 class GA_ROHandleT<T, typename SCALAR(T) >
528 {
529 public:
530  typedef T (*GAprobeAttribGetter)(const GA_Attribute *atr, GA_Offset, int);
531  typedef T BASETYPE;
532 
534  {
535  clear();
536  }
537  GA_ROHandleT(const GA_Attribute *attrib)
538  {
539  bind(attrib);
540  }
541  GA_ROHandleT(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
542 
543  void operator=(const GA_Attribute *attrib)
544  {
545  bind(attrib);
546  }
547 
548  void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
549 
551  void bind(const GA_Attribute *attrib, int minsize=1)
552  {
553  bind(GA_ATINumeric::cast(attrib), minsize);
554  }
555  void bind(const GA_ATINumeric *attrib, int minsize=1)
556  {
557  myExactMatch = nullptr;
558  myAlmostMatch = nullptr;
559  myAttrib = SYSconst_cast(attrib);
560  if (!myAttrib)
561  return;
562 
563  int actual_tuple_size = myAttrib->getTupleSize();
564  if (actual_tuple_size < minsize)
565  {
566  myAttrib = nullptr;
567  return;
568  }
569 
570  UT_Storage actual_storage = attrib->getData().Base::getStorage();
571  if (actual_storage == UT_StorageNum<BASETYPE>::theStorage)
572  {
573  if (actual_tuple_size == 1)
574  myExactMatch = &myAttrib->getData().castType<BASETYPE>().template castTupleSize<1>();
575  else
577  }
578  }
579 
580  const GA_ATINumeric *getAttribute() const { return myAttrib; }
581  int getTupleSize() const { return myAttrib->getTupleSize(); }
582 
584  { if (myAttrib) SYSconst_cast(myAttrib)->flushCECaches(); }
586  { if (myAttrib) SYSconst_cast(myAttrib)->flushCEWriteCaches(); }
587 
589  {
590  if (myAttrib)
591  return myAttrib->getDataId();
592  return GA_INVALID_DATAID;
593  }
594 
595  // Check whether the attribute is GA_TYPE_HPOINT
596  bool isRational() const
597  { return myAttrib->getTypeInfo() == GA_TYPE_HPOINT; }
598 
599  void clear()
600  {
601  myAttrib = nullptr;
602  myExactMatch = nullptr;
603  myAlmostMatch = nullptr;
604  }
605 
607  {
608  return myAttrib;
609  }
611  {
612  return !myAttrib;
613  }
614 
615  SYS_FORCE_INLINE T get(GA_Offset off, int comp = 0) const
616  {
618  UT_ASSERT_P(GAisValid(off));
620  UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
621  if (myExactMatch)
622  {
623  UT_ASSERT_P(comp == 0);
624  return myExactMatch->template get<T>(off);
625  }
626  return getNotInline(off, comp);
627  }
628 private:
629  T getNotInline(GA_Offset off, int comp) const
630  {
631  if (myAlmostMatch)
632  return myAlmostMatch->template get<T>(off, comp);
633  return getOutline(off, comp);
634  }
635 
636  T getOutline(GA_Offset off, int comp) const;
637 
638 public:
639  SYS_FORCE_INLINE void getV(GA_Offset off, T *data, int size) const
640  {
642  UT_ASSERT_P(size >= 0 && size <= myAttrib->getTupleSize());
643  if (myExactMatch)
644  {
645  UT_ASSERT_P(size<=1);
646  if (size==1)
647  data[0] = myExactMatch->template get<T>(off);
648  }
649  else if (myAlmostMatch)
650  {
651  for (int comp = 0; comp < size; ++comp)
652  data[comp] = myAlmostMatch->template get<T>(off, comp);
653  }
654  else
655  {
656  auto &src = myAttrib->getData();
657  for (int comp = 0; comp < size; ++comp)
658  data[comp] = src.get<T>(off, comp);
659  }
660  }
661 
662  /// Copies attribute values from a contiguous block of offsets
663  /// into the dest array.
664  /// NOTE: The block of offsets is assumed to have no holes, else
665  /// data could be read from offsets that don't have
666  /// corresponding elements.
667  void getBlock(GA_Offset startoff, GA_Size nelements, T *dest, int deststride = 1, int component = 0) const;
668 
669  /// Copies attribute values from a contiguous block of indices
670  /// into the dest array.
671  /// This allows there to be holes in the geometry.
672  void getBlockFromIndices(GA_Index startidx, GA_Size nelements, T *dest, int deststride = 1, int component = 0) const;
673 
674  SYS_FORCE_INLINE T operator()(GA_Offset off, int comp = 0) const
675  {
676  return get(off, comp);
677  }
679  {
680  return get(off);
681  }
682  /// Returns true iff the specified page is constant-compressed,
683  /// where a single value is stored to represent GA_PAGE_SIZE
684  /// values in the page, (or possibly fewer if only one page).
686  {
687  return myAttrib->isPageConstant(pagenum);
688  }
689  bool operator==(const GA_ROHandleT<T> &handle) const
690  {
691  return myAttrib == handle.myAttrib;
692  }
693  bool operator!=(const GA_ROHandleT<T> &handle) const
694  {
695  return myAttrib != handle.myAttrib;
696  }
697  const GA_ATINumeric *operator->() const
698  {
699  return myAttrib;
700  }
701 
702 protected:
706 };
707 
708 /// Read-write handle for scalar attribute data.
709 ///
710 /// @tparam T Return type for get methods
711 ///
712 template <typename T>
713 class GA_RWHandleT<T, typename SCALAR(T) > : public GA_ROHandleT<T, typename SCALAR(T) >
714 {
715 public:
718  typedef T BASETYPE;
719 private:
720  using Base::myAttrib;
721  using Base::myExactMatch;
722  using Base::myAlmostMatch;
723 public:
724 
726  {
727  clear();
728  }
730  {
731  bind(attrib);
732  }
733  GA_RWHandleT(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
734 
735  void operator=(GA_Attribute *attrib)
736  {
737  bind(attrib);
738  }
739 
740  void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
741 
743  void bind(GA_Attribute *attrib, int minsize=1)
744  {
745  bind(GA_ATINumeric::cast(attrib), minsize);
746  }
747  void bind(GA_ATINumeric *attrib, int minsize=1)
748  {
749  Base::bind(attrib, minsize);
750  }
751 
752  using Base::clear;
753  using Base::flushCECaches;
755 
756  GA_ATINumeric *getAttribute() const { return myAttrib; }
757 
758  void bumpDataId() const
759  {
760  if (myAttrib)
761  myAttrib->bumpDataId();
762  }
763 
765  {
766  if (myAttrib)
767  return myAttrib->getDataId();
768  return GA_INVALID_DATAID;
769  }
770 
771  SYS_FORCE_INLINE void set(GA_Offset off, T val) const
772  {
774  UT_ASSERT_P(GAisValid(off));
776  if (myExactMatch)
777  myExactMatch->set(off, val);
778  else if (myAlmostMatch)
779  myAlmostMatch->set(off, val);
780  else
781  setOutline(off, val);
782  }
783 
784  SYS_FORCE_INLINE void add(GA_Offset off, T val) const
785  {
787  UT_ASSERT_P(GAisValid(off));
789  if (myExactMatch)
790  myExactMatch->add(off, val);
791  else if (myAlmostMatch)
792  myAlmostMatch->add(off, val);
793  else
794  addOutline(off, val);
795  }
796 
797  SYS_FORCE_INLINE void set(GA_Offset off, int comp, T val) const
798  {
799  UT_ASSERT_P(myAttrib != nullptr);
800  UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
801  UT_ASSERT_P(GAisValid(off));
803  if (myExactMatch)
804  myExactMatch->set(off, comp, val);
805  else if (myAlmostMatch)
806  myAlmostMatch->set(off, comp, val);
807  else
808  setOutline(off, comp, val);
809  }
810  SYS_FORCE_INLINE void setV(GA_Offset off, const T *data, int size) const
811  {
813  UT_ASSERT_P(size >= 0 && size <= myAttrib->getTupleSize());
814  if (myExactMatch)
815  {
816  UT_ASSERT_P(size<=1);
817  if (size==1)
818  myExactMatch->set(off, data[0]);
819  }
820  else if (myAlmostMatch)
821  {
822  for (int comp = 0; comp < size; ++comp)
823  myAlmostMatch->set(off, comp, data[comp]);
824  }
825  else
826  {
827  auto &src = myAttrib->getData();
828  for (int comp = 0; comp < size; ++comp)
829  src.set(off, comp, data[comp]);
830  }
831  }
832 
833  SYS_FORCE_INLINE void add(GA_Offset off, int comp, T val) const
834  {
835  UT_ASSERT_P(myAttrib != nullptr);
836  UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
837  UT_ASSERT_P(GAisValid(off));
839  if (myExactMatch)
840  myExactMatch->add(off, comp, val);
841  else if (myAlmostMatch)
842  myAlmostMatch->add(off, comp, val);
843  else
844  addOutline(off, comp, val);
845  }
846 
847  /// Copies attribute values from the source array into a contiguous
848  /// block of offsets.
849  /// NOTE: The block of offsets is assumed to have no holes, else
850  /// data could be written to offsets that don't have
851  /// corresponding elements.
852  void setBlock(GA_Offset startoff, GA_Size nelements, const T *source, int sourcestride=1, int component=0) const;
853 
854  void setBlockFromIndices(GA_Index startidx, GA_Size nelements, const T *source, int sourcestride = 1, int component = 0) const;
855 
856  // -1 comp means to set all components to cval.
857  void makeConstant(T cval, int comp = -1) const
858  {
860  myAttrib->getAIFTuple()->makeConstant(myAttrib, cval, comp);
861  }
862  void makeConstantV(const T *cval, int size) const
863  {
865  myAttrib->getAIFTuple()->makeConstant(myAttrib, cval, size, 0);
866  }
867  /// Sets all components of all elements of the specified page to
868  /// the given values.
869  /// NOTE: The length of values must be equal to the tuple size.
870  void setPageConstant(GA_PageNum pagenum, const T *values) const
871  {
872  if (myExactMatch)
873  myExactMatch->setPageConstant(pagenum, values);
874  else if (myAlmostMatch)
875  myAlmostMatch->setPageConstant(pagenum, values);
876  else
877  myAttrib->getData().setPageConstant(pagenum, values);
878  }
879 
881  {
882  return myAttrib;
883  }
884 
885 private:
886  void setOutline(GA_Offset off, T val) const;
887  void setOutline(GA_Offset off, int comp, T val) const;
888  void addOutline(GA_Offset off, T val) const;
889  void addOutline(GA_Offset off, int comp, T val) const;
890 };
891 
892 #undef SCALAR
893 
894 /// Read-only handle for string attribute data.
895 template <typename HOLDER, typename INDEXTYPE, typename ATI>
897 {
898 public:
900  {
901  clear();
902  }
904  {
905  bind(attrib);
906  }
908  const UT_StringRef &name, int minsize=1);
909  void operator=(const GA_Attribute *attrib)
910  {
911  bind(attrib);
912  }
913  void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
914 
915  /// Bind the handle to the given attribute
916  void bind(const GA_Attribute *attrib, int minsize=1)
917  {
918  myAttrib = ATI::cast(attrib);
919  if (myAttrib && myAttrib->getTupleSize() < minsize)
920  {
921  myAttrib = nullptr;
922  }
923  }
924 
925  /// Access to attribute
926  const GA_Attribute *getAttribute() const { return myAttrib; }
927  /// Tuple size of the attribute
928  int getTupleSize() const { return myAttrib->getTupleSize(); }
929 
931  { if (myAttrib) SYSconst_cast(myAttrib)->flushCECaches(); }
933  { if (myAttrib) SYSconst_cast(myAttrib)->flushCEWriteCaches(); }
934 
936  {
937  if (myAttrib)
938  return myAttrib->getDataId();
939  return GA_INVALID_DATAID;
940  }
941 
942 
943  /// Clear the handle
944  void clear() { myAttrib = 0; }
945 
946  /// @{
947  /// Validity checks
948  SYS_FORCE_INLINE bool isValid() const { return myAttrib; }
949  SYS_FORCE_INLINE bool isInvalid() const { return !myAttrib; }
950  /// @}
951 
952  /// Get the string at the given offset
953  SYS_FORCE_INLINE const HOLDER &get(GA_Offset off, int comp = 0) const
954  {
956  UT_ASSERT_P(GAisValid(off));
957  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
958  return myAttrib->getHolder(off, comp);
959  }
960  /// Get the string index at the given offset
961  SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp = 0) const
962  {
964  UT_ASSERT_P(GAisValid(off));
965  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
966  return myAttrib->getHolderIndex(off, comp);
967  }
968  const ATI *operator->() const
969  {
970  return myAttrib;
971  }
972 
973  /// Copies attribute string indices from a contiguous block of offsets
974  /// into the dest array.
975  /// NOTE: The block of offsets is assumed to have no holes, else
976  /// data could be read from offsets that don't have
977  /// corresponding elements.
978  void getIndexBlock(GA_Offset startoff, GA_Size nelements, INDEXTYPE *dest, int deststride = 1, int component = 0) const;
979 
980  /// Copies attribute string indices from a contiguous block of indices
981  /// into the dest array.
982  /// This allows there to be holes in the geometry. The dest array
983  /// will be densely filled as per the index mapping.
984  void getIndexBlockFromIndices(GA_Index startidx, GA_Size nelements, INDEXTYPE *dest, int deststride = 1, int component = 0) const;
985 
986 
987 protected:
988  const ATI *myAttrib;
989 };
990 
991 /// Read-Write string handle
992 template <typename HOLDER, typename INDEXTYPE, typename ATI>
993 class GA_RWHandleTHolder : public GA_ROHandleTHolder<HOLDER, INDEXTYPE, ATI>
994 {
995 public:
997 
998 private:
999  using Base::myAttrib;
1000 public:
1001 
1003  : Base()
1004  {
1005  }
1007  : Base(attrib)
1008  {
1009  }
1011  const UT_StringRef &name, int minsize=1)
1012  : Base(gdp, owner, name, minsize)
1013  {
1014  }
1015  void operator=(GA_Attribute *attrib)
1016  {
1017  Base::bind(attrib);
1018  }
1019 
1020  GA_Attribute *getAttribute() const { return rwAttrib(); }
1021 
1022  void bumpDataId() const
1023  {
1024  if (rwAttrib())
1025  rwAttrib()->bumpDataId();
1026  }
1027 
1029  {
1030  if (rwAttrib())
1031  return rwAttrib()->getDataId();
1032  return GA_INVALID_DATAID;
1033  }
1034 
1035  /// Store the @c str at the given offset
1036  SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str) const
1037  {
1038  set(off, 0, str);
1039  }
1040  SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str) const
1041  {
1042  UT_ASSERT_P(rwAttrib() != nullptr);
1043  UT_ASSERT_P(GAisValid(off));
1044  UT_ASSERT_P(rwAttrib()->getIndexMap().isOffsetActive(off) || rwAttrib()->getIndexMap().isOffsetTransient(off));
1045  rwAttrib()->setHolder(off, str, comp);
1046  }
1047  /// Store the string indexed by the @c idx at the given offset
1048  SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx) const
1049  {
1050  set(off, 0, idx);
1051  }
1052  SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx) const
1053  {
1054  UT_ASSERT_P(rwAttrib() != nullptr);
1055  UT_ASSERT_P(GAisValid(off));
1056  UT_ASSERT_P(rwAttrib()->getIndexMap().isOffsetActive(off) || rwAttrib()->getIndexMap().isOffsetTransient(off));
1057  rwAttrib()->setHolderIndex(off, idx, comp);
1058  }
1059  ATI *operator->() const
1060  {
1061  return rwAttrib();
1062  }
1063 protected:
1064  ATI *rwAttrib() const
1065  { return SYSconst_cast(myAttrib); }
1066 };
1067 
1068 /// Read-Write string handle
1069 /// Batches all reference counts until a flush() or its destructor.
1070 /// Because it tracks this locally, you MUST create a separate one
1071 /// per thread! (Even if this were made thread safe, that would
1072 /// defeat the purpose of this, which is to use thread-local reference
1073 /// counts to avoid write contention)
1074 /// NOTE: This bumps the data ID of any attribute it's bound to
1075 /// upon destruction.
1076 template <typename HOLDER, typename INDEXTYPE, typename ATI, typename DELAYEDWRITER>
1078 {
1079 public:
1081  {
1082  clear();
1083  }
1085  {
1086  bind(attrib);
1087  }
1089  const UT_StringRef &name, int minsize=1);
1090  void operator=(GA_Attribute *attrib)
1091  {
1092  bind(attrib);
1093  }
1094  void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
1095 
1096  /// Bind the handle to the given attribute
1097  void bind(GA_Attribute *attrib, int minsize=1)
1098  {
1099  myAttrib = ATI::cast(attrib);
1100  if (myAttrib && myAttrib->getTupleSize() < minsize)
1101  {
1102  myAttrib = nullptr;
1103  }
1104  myWriter.bind(myAttrib);
1105  }
1106 
1107  /// Access to attribute
1108  GA_Attribute *getAttribute() const { return myAttrib; }
1109  /// Tuple size of the attribute
1110  int getTupleSize() const { return myAttrib->getTupleSize(); }
1112  {
1113  if (myAttrib)
1114  return myAttrib->getDataId();
1115  return GA_INVALID_DATAID;
1116  }
1117 
1118  /// Clear the handle
1119  void clear()
1120  {
1121  myAttrib = 0;
1122  myWriter.bind(myAttrib); // Also flushes.
1123  }
1124 
1125  /// @{
1126  /// Validity checks
1127  SYS_FORCE_INLINE bool isValid() const { return myAttrib; }
1128  SYS_FORCE_INLINE bool isInvalid() const { return !myAttrib; }
1129  /// @}
1130 
1131  /// Get the string at the given offset
1132  SYS_FORCE_INLINE HOLDER get(GA_Offset off, int comp = 0) const
1133  {
1135  UT_ASSERT_P(GAisValid(off));
1136  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
1137  return myAttrib->getHolder(off, comp);
1138  }
1139  /// Get the string index at the given offset
1140  SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp = 0) const
1141  {
1143  UT_ASSERT_P(GAisValid(off));
1144  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
1145  return myAttrib->getHolderIndex(off, comp);
1146  }
1147 
1148  /// Store the @c str at the given offset
1149  SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str)
1150  {
1151  set(off, 0, str);
1152  }
1153  SYS_FORCE_INLINE void set(const GA_Range &range, const HOLDER &str)
1154  {
1155  set(range, 0, str);
1156  }
1157  SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str)
1158  {
1160  UT_ASSERT_P(GAisValid(off));
1161  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
1162  myWriter.setHolder(off, str, comp);
1163  }
1164  SYS_FORCE_INLINE void set(const GA_Range &range, int comp, const HOLDER &str)
1165  {
1166  myWriter.setHolder(range, str, comp);
1167  }
1168  /// Store the string indexed by the @c idx at the given offset
1169  SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx)
1170  {
1171  set(off, 0, idx);
1172  }
1173  SYS_FORCE_INLINE void set(const GA_Range &range, INDEXTYPE idx)
1174  {
1175  set(range, 0, idx);
1176  }
1177  SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx)
1178  {
1180  UT_ASSERT_P(GAisValid(off));
1181  UT_ASSERT_P(myAttrib->getIndexMap().isOffsetActive(off) || myAttrib->getIndexMap().isOffsetTransient(off));
1182  myWriter.setHolderIndex(off, idx, comp);
1183  }
1184  SYS_FORCE_INLINE void set(const GA_Range &range, int comp, INDEXTYPE idx)
1185  {
1186  myWriter.setStringIndex(range, idx, comp);
1187  }
1188 
1190  {
1191  return myWriter.hasChanges();
1192  }
1193 protected:
1194  ATI *myAttrib;
1195  DELAYEDWRITER myWriter;
1196 };
1197 
1198 namespace GA_HandleDetail
1199 {
1200 // Helper for determining AIF type given the array type T
1201 template <typename T> struct ArrayAIF;
1202 template <> struct ArrayAIF<UT_Uint8Array> { typedef GA_AIFNumericArray type; };
1203 template <> struct ArrayAIF<UT_Int8Array> { typedef GA_AIFNumericArray type; };
1204 template <> struct ArrayAIF<UT_Int16Array> { typedef GA_AIFNumericArray type; };
1205 template <> struct ArrayAIF<UT_Int32Array> { typedef GA_AIFNumericArray type; };
1206 template <> struct ArrayAIF<UT_Int64Array> { typedef GA_AIFNumericArray type; };
1207 template <> struct ArrayAIF<UT_ValArray<fpreal16>> { typedef GA_AIFNumericArray type; };
1208 template <> struct ArrayAIF<UT_Fpreal32Array> { typedef GA_AIFNumericArray type; };
1209 template <> struct ArrayAIF<UT_Fpreal64Array> { typedef GA_AIFNumericArray type; };
1210 template <> struct ArrayAIF<UT_StringArray> { typedef GA_AIFSharedStringArray type; };
1212 // Helper for determining if we have an acceptable array type
1213 template <typename T> struct IsArray { static const bool value = false; };
1214 template <> struct IsArray<UT_Uint8Array> { static const bool value = true; };
1215 template <> struct IsArray<UT_Int8Array> { static const bool value = true; };
1216 template <> struct IsArray<UT_Int16Array> { static const bool value = true; };
1217 template <> struct IsArray<UT_Int32Array> { static const bool value = true; };
1218 template <> struct IsArray<UT_Int64Array> { static const bool value = true; };
1219 template <> struct IsArray<UT_ValArray<fpreal16>> { static const bool value = true; };
1220 template <> struct IsArray<UT_Fpreal32Array> { static const bool value = true; };
1221 template <> struct IsArray<UT_Fpreal64Array> { static const bool value = true; };
1222 template <> struct IsArray<UT_StringArray> { static const bool value = true; };
1223 template <> struct IsArray<UT_Array<UT_OptionsHolder>> { static const bool value = true; };
1224 }
1225 
1226 #define ENABLE_ARRAY(T) SYS_EnableIf< GA_HandleDetail::IsArray<T>::value >::type
1227 
1228 /// Read-only handle for array attribute data
1229 template <typename T>
1230 class GA_ROHandleT<T, typename ENABLE_ARRAY(T)>
1231 {
1232 public:
1234 
1236  {
1237  clear();
1238  }
1240  {
1241  bind(attrib);
1242  }
1243  GA_ROHandleT(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
1244 
1245  void operator=(const GA_Attribute *attrib)
1246  {
1247  bind(attrib);
1248  }
1249 
1250  void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
1251  void bind(const GA_Attribute *attrib, int minsize=1)
1252  {
1253  myAttrib = const_cast<GA_Attribute *>(attrib);
1254  if (!myAttrib)
1255  return;
1256  myAIF = myAttrib->getAIF<AIFType>();
1257  if (!myAIF)
1258  myAttrib = nullptr;
1259  }
1260 
1261  const GA_Attribute *getAttribute() const { return myAttrib; }
1262 
1264  {
1265  if (myAttrib)
1266  return myAttrib->getDataId();
1267  return GA_INVALID_DATAID;
1268  }
1269 
1270  void clear()
1271  {
1272  myAttrib = nullptr;
1273  myAIF = nullptr;
1274  }
1275 
1276  SYS_FORCE_INLINE bool isValid() const { return myAttrib; }
1277  SYS_FORCE_INLINE bool isInvalid() const { return !myAttrib; }
1278 
1279  SYS_FORCE_INLINE void get(GA_Offset off, T &value) const
1280  {
1282  UT_ASSERT_P(GAisValid(off));
1284  myAIF->get(myAttrib, off, value);
1285  }
1286 
1287  bool operator==(const GA_ROHandleT<T> &handle) const
1288  {
1289  UT_ASSERT_P(myAIF == handle.myAIF);
1290  return myAttrib == handle.myAttrib;
1291  }
1292  bool operator!=(const GA_ROHandleT<T> &handle) const
1293  {
1294  UT_ASSERT_P(myAIF == handle.myAIF);
1295  return myAttrib != handle.myAttrib;
1296  }
1297  const GA_Attribute *operator->() const
1298  {
1299  return myAttrib;
1300  }
1301 
1302 protected:
1304  const AIFType* myAIF;
1305 };
1306 
1307 /// Read-Write handle for array attribute data
1308 template <typename T>
1309 class GA_RWHandleT<T, typename ENABLE_ARRAY(T)>
1310  : public GA_ROHandleT<T, typename ENABLE_ARRAY(T)>
1311 {
1312 public:
1314 
1315 private:
1316  using Base::myAttrib;
1317 public:
1318 
1320  {
1321  this->clear();
1322  }
1324  {
1325  bind(attrib);
1326  }
1327  GA_RWHandleT(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
1328 
1329  void operator=(GA_Attribute *attrib)
1330  {
1331  bind(attrib);
1332  }
1333 
1334  void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1);
1335  void bind(GA_Attribute *attrib, int minsize=1)
1336  {
1337  Base::bind(attrib, minsize);
1338  }
1339 
1341 
1342  void bumpDataId() const
1343  {
1344  if (myAttrib)
1345  myAttrib->bumpDataId();
1346  }
1347 
1349  {
1350  if (myAttrib)
1351  return myAttrib->getDataId();
1352  return GA_INVALID_DATAID;
1353  }
1354 
1355  SYS_FORCE_INLINE void set(GA_Offset off, const T &value) const
1356  {
1358  UT_ASSERT_P(GAisValid(off));
1360  Base::myAIF->set(myAttrib, off, value);
1361  }
1363  {
1364  return myAttrib;
1365  }
1366 
1367 private:
1368 };
1369 
1370 #undef ENABLE_ARRAY
1371 
1372 template <typename T>
1374 {
1375 public:
1378 };
1379 
1383 
1387 
1388 // Hacky workaround for now
1389 template <>
1390 class GA_HandleT<const char*>
1391 {
1392 public:
1393  typedef GA_ROHandleS ROType;
1394  typedef GA_RWHandleS RWType;
1395 };
1396 
1399 
1402 
1405 
1408 
1411 
1414 
1417 
1420 
1423 
1426 
1429 
1432 
1435 
1438 
1441 
1444 
1447 
1450 
1453 
1456 
1459 
1462 
1465 
1468 
1471 
1474 
1477 
1480 
1481 #endif
GA_RWHandleT(GA_Attribute *attrib)
Definition: GA_Handle.h:328
void setBlockFromIndices(GA_Index startidx, GA_Size nelements, const T *source, int sourcestride=1, int component=0) const
void setPageConstant(GA_PageNum pagenum, const T *values) const
Definition: GA_Handle.h:870
SYS_FORCE_INLINE void bumpDataId()
Definition: GA_Attribute.h:315
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
T::value_type BASETYPE
Definition: GA_Handle.h:115
Definition of a geometry attribute.
Definition: GA_Attribute.h:203
void makeConstant(const T &cval) const
Definition: GA_Handle.h:488
GA_RWHandleT< UT_Int32Array > GA_RWHandleIA
Definition: GA_Handle.h:1464
GA_ATINumeric * operator->() const
Definition: GA_Handle.h:507
void SecondGuess
Definition: UT_Storage.h:91
void flushCECaches()
Definition: GA_Handle.h:930
GA_RWBatchHandleTHolder(GA_Attribute *attrib)
Definition: GA_Handle.h:1084
UT_FixedVector< ALTBASETYPE, theTupleSize > ALTTYPE
Definition: GA_Handle.h:322
GA_RWHandleT< UT_Vector2D > GA_RWHandleV2D
Definition: GA_Handle.h:1452
SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx) const
Store the string indexed by the idx at the given offset.
Definition: GA_Handle.h:1048
Generic Attribute Interface class to access an attribute as a array.
SYS_FORCE_INLINE ALTTYPE getAlt(GA_Offset off, int comp=0) const
Definition: GA_Handle.h:223
GLenum GLint * range
Definition: glcorearb.h:1925
GA_PageArray< BASETYPE, 1 > * myExactMatch
Definition: GA_Handle.h:704
GA_ROHandleT< UT_StringArray > GA_ROHandleSA
Definition: GA_Handle.h:1475
UT_Storage
Definition: UT_Storage.h:28
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
Definition: GA_Handle.h:685
GA_RWHandleTHolder(GA_Attribute *attrib)
Definition: GA_Handle.h:1006
GA_ROHandleT< int8 > GA_ROHandleC
Definition: GA_Handle.h:1409
void bind(const GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:1251
GA_RWHandleT< UT_FprealArray > GA_RWHandleRA
Definition: GA_Handle.h:1461
void
Definition: png.h:1083
void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
GA_RWHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict > GA_RWHandleDict
Definition: GA_Handle.h:1385
GA_ROHandleT< UT_Vector4D > GA_ROHandleV4D
Definition: GA_Handle.h:1457
SYS_FORCE_INLINE void bind(const GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:551
const DataType & getData() const
int64 GA_DataId
Definition: GA_Types.h:703
#define ENABLE_ARRAY(T)
Definition: GA_Handle.h:1226
SYS_FORCE_INLINE bool isInvalid() const
Definition: GA_Handle.h:1277
virtual bool makeConstant(GA_Attribute *attrib, int32 data, int index=0) const =0
void makeConstantV(const T *cval, int size) const
Definition: GA_Handle.h:862
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const T &val) const
Definition: GA_Handle.h:397
SYS_FORCE_INLINE const GA_IndexMap & getIndexMap() const
Definition: GA_Attribute.h:212
GA_RWHandleT< UT_QuaternionD > GA_RWHandleQD
Definition: GA_Handle.h:1449
void clear()
Clear the handle.
Definition: GA_Handle.h:1119
void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
void clear()
Clear the handle.
Definition: GA_Handle.h:944
GA_PageArray< BASETYPE, theTupleSize > * myExactMatch
Definition: GA_Handle.h:299
GLuint start
Definition: glcorearb.h:475
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void bind(GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:1335
GA_RWHandleT< fpreal > GA_RWHandleR
Definition: GA_Handle.h:1398
GA_DataId getDataId() const
Definition: GA_Handle.h:935
int getTupleSize() const
const GA_Attribute * getAttribute() const
Access to attribute.
Definition: GA_Handle.h:926
GA_RWHandleT< UT_Int64Array > GA_RWHandleIDA
Definition: GA_Handle.h:1467
GA_ROHandleT< UT_Vector4F > GA_ROHandleV4
Definition: GA_Handle.h:1433
GA_ROHandleT< UT_Vector2F > GA_ROHandleV2
Definition: GA_Handle.h:1427
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
Definition: SYS_Types.h:136
SYS_FORCE_INLINE bool isValid() const
Definition: GA_Handle.h:1127
GA_ROHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict > GA_ROHandleDict
Definition: GA_Handle.h:1384
GA_ROHandleT< UT_Array< UT_OptionsHolder > > GA_ROHandleDictA
Definition: GA_Handle.h:1478
SYS_FORCE_INLINE void add(IDX_T i, SRC_DATA_T v)
component == 0 in this version
Definition: UT_PageArray.h:592
Read-Write string handle.
Definition: GA_Handle.h:993
SYS_FORCE_INLINE void setAlt(GA_Offset off, const ALTTYPE &val) const
Definition: GA_Handle.h:384
SYS_FORCE_INLINE void addAlt(GA_Offset off, const ALTTYPE &val) const
Definition: GA_Handle.h:438
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE bool isValid() const
Definition: GA_Handle.h:948
SYS_FORCE_INLINE DEST_DATA_T get(IDX_T i, exint component=0) const
Definition: UT_PageArray.h:487
GA_ATINumeric * operator->() const
Definition: GA_Handle.h:880
GA_ROHandleT< UT_Vector3D > GA_ROHandleV3D
Definition: GA_Handle.h:1454
void operator=(GA_Attribute *attrib)
Definition: GA_Handle.h:1329
bool operator==(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:285
GA_ROHandleT(const GA_Attribute *attrib)
Definition: GA_Handle.h:537
SYS_FORCE_INLINE void bind(GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:342
GA_ATINumeric * getAttribute() const
Definition: GA_Handle.h:756
GA_ROHandleT< UT_Matrix4D > GA_ROHandleM4D
Definition: GA_Handle.h:1445
GA_RWHandleT< int64 > GA_RWHandleID
Definition: GA_Handle.h:1437
void setPageConstant(GA_PageNum pagenum, const BASETYPE *values) const
Definition: GA_Handle.h:497
SYS_FORCE_INLINE void set(GA_Offset off, T val) const
Definition: GA_Handle.h:771
GA_RWHandleT< UT_Vector4D > GA_RWHandleV4D
Definition: GA_Handle.h:1458
SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp=0) const
Get the string index at the given offset.
Definition: GA_Handle.h:961
**But if you need a result
Definition: thread.h:622
int getTupleSize() const
Tuple size of the attribute.
Definition: GA_Handle.h:1110
ATI * operator->() const
Definition: GA_Handle.h:1059
#define GA_INVALID_DATAID
Definition: GA_Types.h:704
SYS_FORCE_INLINE void bind(const GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:138
SYS_FORCE_INLINE void set(const GA_Range &range, int comp, INDEXTYPE idx)
Definition: GA_Handle.h:1184
void operator=(GA_Attribute *attrib)
Definition: GA_Handle.h:735
SYS_FORCE_INLINE void addAlt(GA_Offset off, int comp, const ALTTYPE &val) const
Definition: GA_Handle.h:465
GA_ROHandleT< int64 > GA_ROHandleID
Definition: GA_Handle.h:1436
SYS_FORCE_INLINE void set(IDX_T i, SRC_DATA_T v)
component == 0 in this version
Definition: UT_PageArray.h:586
const ATI * myAttrib
Definition: GA_Handle.h:988
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
Definition: GA_Types.h:662
SYS_FORCE_INLINE void bind(GA_ATINumeric *attrib, int minsize=1)
Definition: GA_Handle.h:347
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str)
Definition: GA_Handle.h:1157
uint64 value_type
Definition: GA_PrimCompat.h:29
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:243
GA_ATINumeric * getAttribute() const
Definition: GA_Handle.h:356
GA_ROHandleTHolder< HOLDER, INDEXTYPE, ATI > Base
Definition: GA_Handle.h:996
const GA_Attribute * getAttribute() const
Definition: GA_Handle.h:1261
GA_ROHandleT< UT_Vector3F > GA_ROHandleV3
Definition: GA_Handle.h:1430
SYS_FORCE_INLINE bool isValid() const
Definition: GA_Handle.h:1276
GA_DataId getDataId() const
Definition: GA_Handle.h:1028
void operator=(const GA_Attribute *attrib)
Definition: GA_Handle.h:130
A range of elements in an index-map.
Definition: GA_Range.h:42
GA_ROHandleT< UT_Matrix3D > GA_ROHandleM3D
Definition: GA_Handle.h:1442
SYS_FORCE_INLINE void getV(GA_Offset off, T *data, int size) const
Definition: GA_Handle.h:639
GA_ROHandleT< UT_Matrix2F > GA_ROHandleM2
Definition: GA_Handle.h:1415
GA_RWHandleT< UT_Vector3F > GA_RWHandleV3
Definition: GA_Handle.h:1431
const GA_ATINumeric * getAttribute() const
Definition: GA_Handle.h:168
GA_Size GA_Offset
Definition: GA_Types.h:653
GA_RWBatchHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict, GA_ATIDictDelayedWriter > GA_RWBatchHandleDict
Definition: GA_Handle.h:1386
GA_PageArray< BASETYPE > * myAlmostMatch
Definition: GA_Handle.h:705
void makeConstant(T cval, int comp=-1) const
Definition: GA_Handle.h:857
SYS_FORCE_INLINE bool isInvalid() const
Definition: GA_Handle.h:610
void bind(const GA_ATINumeric *attrib, int minsize=1)
Definition: GA_Handle.h:555
SYS_FORCE_INLINE void add(GA_Offset off, const T &val) const
Definition: GA_Handle.h:425
GA_ROHandleT< UT_Matrix3F > GA_ROHandleM3
Definition: GA_Handle.h:1418
GA_ROHandleT< int32 > GA_ROHandleI
Definition: GA_Handle.h:1412
GA_RWHandleT< UT_Fpreal64Array > GA_RWHandleDA
Definition: GA_Handle.h:1473
SYS_FORCE_INLINE void add(GA_Offset off, int comp, T val) const
Definition: GA_Handle.h:833
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str) const
Definition: GA_Handle.h:1040
GLintptr offset
Definition: glcorearb.h:665
SYS_FORCE_INLINE void set(GA_Offset off, int comp, T val) const
Definition: GA_Handle.h:797
GA_RWHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString > GA_RWHandleS
Definition: GA_Handle.h:1381
SYS_FORCE_INLINE void add(GA_Offset off, T val) const
Definition: GA_Handle.h:784
const GA_AIFTuple * getAIFTuple() const override
Return the attribute's tuple interface or NULL.
SYS_FORCE_INLINE const X * cast(const InstancablePtr *o)
ATI * rwAttrib() const
Definition: GA_Handle.h:1064
T::value_type BASETYPE
Definition: GA_Handle.h:314
SYS_FORCE_INLINE void setV(GA_Offset off, const T *data, int size) const
Definition: GA_Handle.h:810
void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
void clear()
Definition: GA_Handle.h:187
void getIndexBlockFromIndices(GA_Index startidx, GA_Size nelements, INDEXTYPE *dest, int deststride=1, int component=0) const
GA_RWHandleT< UT_Fpreal32Array > GA_RWHandleFA
Definition: GA_Handle.h:1470
bool isOffsetTransient(GA_Offset offset) const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx) const
Definition: GA_Handle.h:1052
SYS_FORCE_INLINE void set(const GA_Range &range, INDEXTYPE idx)
Definition: GA_Handle.h:1173
void getBlockFromIndices(GA_Index startidx, GA_Size nelements, T *dest, int deststride=1, int component=0) const
void operator=(GA_Attribute *attrib)
Definition: GA_Handle.h:1015
GA_RWHandleT< UT_Vector4F > GA_RWHandleV4
Definition: GA_Handle.h:1434
#define UT_ASSERT_P(ZZ)
Definition: UT_Assert.h:164
GA_RWHandleT< UT_Matrix2F > GA_RWHandleM2
Definition: GA_Handle.h:1416
bool operator!=(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:1292
SYS_FORCE_INLINE void setPageConstant(UT_PageNum pagenum, const NotVoidType &val)
static SYS_FORCE_INLINE GA_ATINumeric * cast(GA_Attribute *attrib)
Definition: GA_ATINumeric.h:65
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void(* GAprobeAttribSetter)(GA_Attribute *atr, GA_Offset, const T &)
Definition: GA_Handle.h:312
void getIndexBlock(GA_Offset startoff, GA_Size nelements, INDEXTYPE *dest, int deststride=1, int component=0) const
GA_ROHandleT< fpreal32 > GA_ROHandleF
Definition: GA_Handle.h:1403
SYS_FORCE_INLINE void set(GA_Offset off, const T &value) const
Definition: GA_Handle.h:1355
GA_ATINumeric * myAttrib
Definition: GA_Handle.h:298
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:803
const GA_ATINumeric * operator->() const
Definition: GA_Handle.h:697
void getBlock(GA_Offset startoff, GA_Size nelements, T *dest, int deststride=1, int component=0) const
A specialization of GA_AIFStringArray to access "shared strings".
GA_RWHandleT< fpreal64 > GA_RWHandleD
Definition: GA_Handle.h:1407
void(* GAprobeAttribGetter)(T &result, const GA_Attribute *atr, GA_Offset)
Definition: GA_Handle.h:114
void bind(GA_Attribute *attrib, int minsize=1)
Bind the handle to the given attribute.
Definition: GA_Handle.h:1097
GA_ROHandleT< UT_Fpreal64Array > GA_ROHandleDA
Definition: GA_Handle.h:1472
GA_RWHandleT< UT_Matrix4F > GA_RWHandleM4
Definition: GA_Handle.h:1422
bool operator!=(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:693
GA_RWHandleT< UT_Matrix3D > GA_RWHandleM3D
Definition: GA_Handle.h:1443
GA_RWHandleTHolder(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
Definition: GA_Handle.h:1010
GA_ROHandleT< fpreal64 > GA_ROHandleD
Definition: GA_Handle.h:1406
GA_RWHandleT< T > RWType
Definition: GA_Handle.h:1377
const GA_Attribute * operator->() const
Definition: GA_Handle.h:1297
SYS_FORCE_INLINE T operator()(GA_Offset off, int comp=0) const
Definition: GA_Handle.h:674
GA_HandleDetail::ArrayAIF< T >::type AIFType
Definition: GA_Handle.h:1233
GLuint const GLchar * name
Definition: glcorearb.h:786
SYS_FORCE_INLINE GA_DataId getDataId() const
Definition: GA_Attribute.h:308
SYS_FORCE_INLINE T operator[](GA_Offset off) const
Definition: GA_Handle.h:678
GA_DataId getDataId() const
Definition: GA_Handle.h:364
SYS_FORCE_INLINE bool isInvalid() const
Definition: GA_Handle.h:198
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:647
void bumpDataId() const
Definition: GA_Handle.h:358
GA_RWHandleT< fpreal16 > GA_RWHandleH
Definition: GA_Handle.h:1401
SYS_FORCE_INLINE void set(const GA_Range &range, const HOLDER &str)
Definition: GA_Handle.h:1153
Read-only handle for string attribute data.
Definition: GA_Handle.h:896
UT_FixedVector< ALTBASETYPE, theTupleSize > ALTTYPE
Definition: GA_Handle.h:118
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
SYS_FORCE_INLINE void add(GA_Offset off, int comp, const T &val) const
Definition: GA_Handle.h:451
SYS_FORCE_INLINE void addVector(IDX_T i, const TS &as)
Definition: UT_PageArray.h:699
GA_ROHandleT< UT_Int32Array > GA_ROHandleIA
Definition: GA_Handle.h:1463
GA_ROHandleT< fpreal16 > GA_ROHandleH
Definition: GA_Handle.h:1400
GA_Attribute * getAttribute() const
Access to attribute.
Definition: GA_Handle.h:1108
const ATI * operator->() const
Definition: GA_Handle.h:968
SYS_FORCE_INLINE bool isValid() const
Definition: GA_Handle.h:194
void bumpDataId() const
Definition: GA_Handle.h:1022
SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx)
Definition: GA_Handle.h:1177
bool isRational() const
Definition: GA_Handle.h:184
GLsizeiptr size
Definition: glcorearb.h:664
void setBlock(GA_Offset startoff, GA_Size nelements, const T *source, int sourcestride=1, int component=0) const
GA_AttributeOwner
Definition: GA_Types.h:35
GA_ROHandleTHolder(const GA_Attribute *attrib)
Definition: GA_Handle.h:903
bool operator==(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:689
GA_ROHandleT(const GA_Attribute *attrib)
Definition: GA_Handle.h:1239
GA_RWHandleT< UT_Vector2F > GA_RWHandleV2
Definition: GA_Handle.h:1428
#define SCALAR(T)
Simplify checking for scalar types.
Definition: GA_Handle.h:520
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
Definition: GA_Handle.h:281
GA_ROHandleT< fpreal > GA_ROHandleR
Definition: GA_Handle.h:1397
SYS_FORCE_INLINE void setAlt(GA_Offset off, int comp, const ALTTYPE &val) const
Definition: GA_Handle.h:411
void bind(const GA_Attribute *attrib, int minsize=1)
Bind the handle to the given attribute.
Definition: GA_Handle.h:916
GA_RWHandleT< UT_Matrix4D > GA_RWHandleM4D
Definition: GA_Handle.h:1446
GA_ROHandleT< UT_FprealArray > GA_ROHandleRA
Definition: GA_Handle.h:1460
bool isOffsetActive(GA_Offset offset) const
Returns true if the specified offset is referenced by an ordered element.
Definition: GA_IndexMap.h:483
SYS_FORCE_INLINE void set(const GA_Range &range, int comp, const HOLDER &str)
Definition: GA_Handle.h:1164
GA_ROHandleT< T > Base
Definition: GA_Handle.h:313
void operator=(const GA_Attribute *attrib)
Definition: GA_Handle.h:543
GA_ROHandleT< UT_Matrix4F > GA_ROHandleM4
Definition: GA_Handle.h:1421
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1602
GA_RWHandleT< UT_Vector3D > GA_RWHandleV3D
Definition: GA_Handle.h:1455
GA_ROHandleT< UT_QuaternionF > GA_ROHandleQ
Definition: GA_Handle.h:1424
GA_RWHandleT< UT_Array< UT_OptionsHolder > > GA_RWHandleDictA
Definition: GA_Handle.h:1479
SYS_FORCE_INLINE GA_TypeInfo getTypeInfo() const
Definition: GA_Attribute.h:257
SYS_FORCE_INLINE void set(GA_Offset off, const T &val) const
Definition: GA_Handle.h:371
void flushCECaches()
Definition: GA_Handle.h:170
void operator=(GA_Attribute *attrib)
Definition: GA_Handle.h:334
SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str) const
Store the str at the given offset.
Definition: GA_Handle.h:1036
void operator=(const GA_Attribute *attrib)
Definition: GA_Handle.h:909
GA_Size GA_PageNum
Definition: GA_Types.h:656
const T * getAIF() const
Generic method for getting an AIF by type.
Definition: GA_Attribute.h:425
GA_ROHandleT< UT_Int64Array > GA_ROHandleIDA
Definition: GA_Handle.h:1466
SYS_FORCE_INLINE bool isInvalid() const
Definition: GA_Handle.h:949
void bind(GA_ATINumeric *attrib, int minsize=1)
Definition: GA_Handle.h:747
SYS_FORCE_INLINE bool isValid() const
Definition: GA_Handle.h:606
A specialization of GA_AIFDictArray to access "shared strings".
void operator=(GA_Attribute *attrib)
Definition: GA_Handle.h:1090
GA_RWHandleT< fpreal32 > GA_RWHandleF
Definition: GA_Handle.h:1404
GA_RWHandleT< int8 > GA_RWHandleC
Definition: GA_Handle.h:1410
GA_ROHandleT(const GA_Attribute *attrib)
Definition: GA_Handle.h:124
GLuint GLfloat * val
Definition: glcorearb.h:1608
GA_ROHandleT< T > ROType
Definition: GA_Handle.h:1376
GA_RWHandleT(GA_Attribute *attrib)
Definition: GA_Handle.h:729
GA_ROHandleT< UT_QuaternionD > GA_ROHandleQD
Definition: GA_Handle.h:1448
void flushCEWriteCaches()
Definition: GA_Handle.h:172
DELAYEDWRITER myWriter
Definition: GA_Handle.h:1195
GA_DataId getDataId() const
Definition: GA_Handle.h:1111
Container class for all geometry.
Definition: GA_Detail.h:105
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
GA_RWBatchHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString, GA_ATIStringDelayedWriter > GA_RWBatchHandleS
Definition: GA_Handle.h:1382
SYS_FORCE_INLINE bool hasChanges() const
Definition: GA_Handle.h:1189
SYS_FORCE_INLINE const GA_PageArray< DEST_DATA_T, TSIZE, TABLEHARDENED, PAGESHARDENED > & castType() const
Definition: GA_PageArray.h:732
GA_DataId getDataId() const
Definition: GA_Handle.h:175
void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
GA_ROHandleT< UT_Matrix2D > GA_ROHandleM2D
Definition: GA_Handle.h:1439
SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str)
Store the str at the given offset.
Definition: GA_Handle.h:1149
bool operator==(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:1287
GA_ROHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString > GA_ROHandleS
Definition: GA_Handle.h:1380
int getTupleSize() const
Tuple size of the attribute.
Definition: GA_Handle.h:928
SYS_FORCE_INLINE void setVector(IDX_T i, const TS &as)
Definition: UT_PageArray.h:693
SYS_FORCE_INLINE bool isAltBound() const
Definition: GA_Handle.h:205
GA_RWHandleT< UT_QuaternionF > GA_RWHandleQ
Definition: GA_Handle.h:1425
GA_RWHandleT< int32 > GA_RWHandleI
Definition: GA_Handle.h:1413
typename UT_StorageNum< BASETYPE >::SecondGuess ALTBASETYPE
Definition: GA_Handle.h:117
SYS_FORCE_INLINE bool isInvalid() const
Definition: GA_Handle.h:1128
GA_ROHandleT< UT_Fpreal32Array > GA_ROHandleFA
Definition: GA_Handle.h:1469
UT_StringHolder & operator()(exint i)
Definition: UT_Array.h:791
GA_RWHandleT< UT_Matrix3F > GA_RWHandleM3
Definition: GA_Handle.h:1419
const GA_ATINumeric * operator->() const
Definition: GA_Handle.h:293
GA_PageArray< typename UT_StorageNum< BASETYPE >::SecondGuess, theTupleSize > * myAlmostMatch
Definition: GA_Handle.h:300
SYS_FORCE_INLINE T operator()(GA_Offset off) const
Definition: GA_Handle.h:270
SYS_FORCE_INLINE T operator[](GA_Offset off) const
Definition: GA_Handle.h:274
SYS_FORCE_INLINE void bind(GA_Attribute *attrib, int minsize=1)
Definition: GA_Handle.h:743
bool operator!=(const GA_ROHandleT< T > &handle) const
Definition: GA_Handle.h:289
GA_Attribute * getAttribute() const
Definition: GA_Handle.h:1340
GA_RWHandleT< UT_Matrix2D > GA_RWHandleM2D
Definition: GA_Handle.h:1440
Definition: format.h:1821
SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp=0) const
Get the string index at the given offset.
Definition: GA_Handle.h:1140
const GA_ATINumeric * getAttribute() const
Definition: GA_Handle.h:580
GA_RWHandleT< UT_StringArray > GA_RWHandleSA
Definition: GA_Handle.h:1476
void flushCEWriteCaches()
Definition: GA_Handle.h:932
void operator=(const GA_Attribute *attrib)
Definition: GA_Handle.h:1245
GA_Attribute * getAttribute() const
Definition: GA_Handle.h:1020
GA_ROHandleT< UT_Vector2D > GA_ROHandleV2D
Definition: GA_Handle.h:1451
static const exint theTupleSize
Definition: GA_Handle.h:116
void bind(const GA_ATINumeric *attrib, int minsize=1)
Definition: GA_Handle.h:143
GLenum src
Definition: glcorearb.h:1793
SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx)
Store the string indexed by the idx at the given offset.
Definition: GA_Handle.h:1169