HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_ATIBlob.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_ATIBlob.h ( GA Library, C++)
7  *
8  * COMMENTS: Blob ATI (Attribute Type Implementation)
9  */
10 
11 #pragma once
12 
13 #ifndef __GA_ATIBlob__
14 #define __GA_ATIBlob__
15 
16 #define GA_NEW_STRING_DATA_STRUCTURE 1
17 
18 #include "GA_API.h"
19 #include "GA_Attribute.h"
20 #include "GA_BlobContainer.h"
21 #include "GA_BlobData.h"
22 #include "GA_PageArray.h"
23 #include "GA_Types.h"
24 
25 #include <UT/UT_StringHolder.h>
26 #include <UT/UT_VectorTypes.h>
27 
28 #include <SYS/SYS_Types.h>
29 
30 #include <stddef.h>
31 
32 
33 class GA_AIFBlob;
34 class GA_AIFCompare;
35 class GA_AIFCopyData;
36 class GA_AIFInterp;
37 class GA_AIFMerge;
38 class GA_AttributeType;
39 class GA_Defragment;
40 class GA_IndexMap;
41 class GA_LoadMap;
42 class GA_MergeMap;
43 class GA_SaveMap;
44 class GA_Range;
45 
46 class UT_JSONParser;
47 class UT_JSONWriter;
48 class UT_Options;
49 template <typename T> class UT_Array;
50 
51 
52 /// @brief Utility class to load blob data from a JSON stream
53 ///
54 /// Since blobs are opaque to the blob container, it's impossible to create
55 /// blobs when loading. If blobs need to be saved/loaded, a blob loader class
56 /// will have to be used to create blob data from the stream.
57 /// This class should load the data stored by the BlobData::jsonSave() method.
59 {
60 public:
61  virtual ~GA_BlobDataLoader() {}
62 
63  /// Load the data from the JSON parser and assign the blob to the handle
64  /// passed in. If there's an error loading the blob, then, return false.
65  virtual bool jsonLoad(UT_JSONParser &p,
66  const GA_LoadMap &load,
67  GA_BlobRef &handle) const = 0;
68 };
69 
70 /// @brief A simple ATI to store aribtrary "blobs" of data in an attribute
71 ///
72 /// The blob attribute type stores arbitrary blobs (GA_Blob) of data for each
73 /// element in the attribute array. The blobs are stored as reference counted
74 /// shared objects, meaning the blobs may be shared between multiple elements
75 /// of the array. Each blob is referenced by a unique integer handle.
76 ///
77 /// It's also possible to get a list of all the blobs stored by the attribute
78 ///
79 /// By default, the array is filled with NULL pointers.
80 ///
81 /// This class is very simple and only provides a minimal interface. Blob
82 /// attributes are not saved/loaded, and there is minimal access to the blobs.
83 ///
84 /// Users may sub-class from this ATI to create more complicated classes which
85 /// provide alternate interfaces.
86 ///
87 /// This attribute looks for options (GA_Attribute::getOptions())
88 /// - bool blob:stringset (default: true)@n
89 /// This option is queried when merging detail attributes. When true,
90 /// the @b unique blobs from both details will be merged into the resulting
91 /// detail. When false, the resulting detail will only have the blobs from
92 /// the first detail in the merge.
93 ///
95 {
96 public:
97  static void registerType();
99  static const UT_StringHolder &getTypeName()
100  { return theAttributeType->getTypeName(); }
102  static const GA_AttributeType &getType() { return *theAttributeType; }
103 
104 #if GA_NEW_STRING_DATA_STRUCTURE
106  static bool isType(const GA_Attribute *attrib)
107  {
108  return attrib && (&attrib->getType() == theAttributeType);
109  }
111  static GA_ATIBlob *cast(GA_Attribute *attrib)
112  {
113  if (attrib && (&attrib->getType() == theAttributeType))
114  return static_cast<GA_ATIBlob *>(attrib);
115  return nullptr;
116  }
118  static const GA_ATIBlob *cast(const GA_Attribute *attrib)
119  {
120  if (attrib && (&attrib->getType() == theAttributeType))
121  return static_cast<const GA_ATIBlob *>(attrib);
122  return nullptr;
123  }
124 #else
126  static bool isType(const GA_Attribute *attrib);
128  static GA_ATIBlob *cast(GA_Attribute *attrib);
130  static const GA_ATIBlob *cast(const GA_Attribute *attrib);
131 #endif
132 
133  static GA_Attribute *create(const GA_IndexMap &index_map,
134  GA_AttributeScope scope,
135  const UT_StringHolder &name,
136  int tuple_size,
137  const GA_AttributeOptions *attribute_options=NULL);
138  static GA_Attribute *create(const GA_IndexMap &index_map,
139  const UT_StringHolder &name,
140  int tuple_size)
141  {
142  return create(index_map, GA_SCOPE_PUBLIC, name,
143  tuple_size);
144  }
145 
147  const GA_IndexMap &index_map,
148  GA_AttributeScope scope,
149  const char *name,
150  int tuple_size);
151  virtual ~GA_ATIBlob();
152 
153  /// Report approximate memory usage
154  virtual int64 getMemoryUsage(bool inclusive) const;
155 
156  virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const;
157 
158  /// @{
159  /// Interface for defragmentation
160  virtual void defragment(const GA_Defragment &defrag);
161  /// @}
162 
163  virtual void reconstructElementBlock(GA_Offset offset, GA_Offset nelements);
164 
165  /// Get the tuple size
167  int getTupleSize() const
168  { return myHandles.getTupleSize(); }
169 
170  /// Return the entries in the blob container
171  int entries() const
172  { return myBlobs.entries(); }
173 
174  /// Return the maximum index of any blob in the container. This may be
175  /// more than the number of blobs in the container. If the maximum index
176  /// is less than 0, there are no blobs in the container.
178  { return myBlobs.getMaximumIndex(); }
179 
180  /// Return the capacity of the blob container
181  int capacity() const
182  { return myBlobs.capacity(); }
183 
184  /// Look up a blob handle by offset.
186  GA_BlobIndex getBlobIndex(GA_Offset offset, int tuple_index=0) const
187  {
188  if (tuple_index >= 0 && tuple_index < getTupleSize())
189  return GA_BlobIndex(myHandles.get(offset, tuple_index));
191  }
192 
193  /// Store a new blob_index at the given offset
194  bool setBlobIndex(GA_BlobIndex blob_index, GA_Offset offset,
195  int tuple_idx=0);
196 
197  /// Store a new blob_index at the given range of offsets
198  bool setBlobIndex(GA_BlobIndex blob_i,
199  const GA_Range &di,
200  int tuple_index = 0);
201 
202  /// Get the blob associated with a given offset into the array
203  /// @{
205  GA_BlobRef getBlob(GA_Offset offset, int tuple_idx = 0) const
206  {
207  return lookupBlob(getBlobIndex(offset, tuple_idx));
208  }
210  const GA_BlobData *getRawBlob(GA_Offset offset, int tuple_idx = 0) const
211  {
212  return lookupRawBlob(getBlobIndex(offset, tuple_idx));
213  }
214  /// @}
215 
216  /// Store a new blob at the given offset
217  bool setBlob(const GA_BlobRef &blob, GA_Offset offset,
218  int tuple_index = 0);
219 
220  /// Replace a blob in the blob container with a new blob value
221  bool replaceBlob(GA_BlobIndex handle,
222  const GA_BlobRef &blob);
223 
224 
225  /// Look up a blob given its handle
226  /// @{
229  { return myBlobs.getBlob(handle); }
230 
233  { return myBlobs.getRawBlob(handle); }
234  /// @}
235 
236  /// Lookup a blob given an ordered index
238  { return myBlobs.getOrderedBlob(idx); }
239 
240  /// This method will "compact" the attribute container, possibly changing
241  /// all the handles in the attribute data.
242  virtual void compactStorage();
243 
244  /// Get a measure of the vacancy entropy of the storage container. This
246  { return myBlobs.getOccupancy(); }
247 
248  /// Adding blobs is thread-safe, so we're only subject to GA_PageArray
249  /// limitations.
251  { return WRITE_CONCURRENCE_PAGE; }
252 
253  virtual const GA_AIFBlob *getAIFBlob() const { return myAIFBlob; }
254  virtual const GA_AIFMerge *getAIFMerge() const { return myAIFMerge; }
255  virtual const GA_AIFCompare *getAIFCompare() const { return myAIFCompare;}
256  virtual const GA_AIFCopyData *getAIFCopyData() const{ return myAIFCopyData;}
257  virtual const GA_AIFInterp *getAIFInterp() const { return myAIFInterp; }
258 
259  /// Save blobs to a JSON stream.
260  /// This method can be called by sub-classes to save blob data to a JSON
261  /// stream. Since the GA_ATIBlob class doesn't provide an GA_AIFJSON
262  /// interface, data is not saved/loaded by default.
263  ///
264  /// @param w The JSON writer
265  /// @param s The save map options
266  /// @param blobtoken The token used to identify the blob data
267  bool jsonSave(UT_JSONWriter &w,
268  const GA_SaveMap &s,
269  const char *blobtoken = "data") const;
270 
271  /// Load blobs from a JSON stream. This method can be called by
272  /// sub-classes to load their data from a JSON stream. The class must
273  /// provide a GA_BlobDataLoader class which is used to create and load new
274  /// blob data.
275  ///
276  /// @param p The JSON parser
277  /// @param blobloader A class to create and load blobs
278  /// @param load Load options
279  /// @param blobtoken The token used to identify the blob data
280  bool jsonLoad(UT_JSONParser &p,
281  const GA_BlobDataLoader &blobloader,
282  const GA_LoadMap &load,
283  const char *blobtoken = "data");
284 
285  /// Convenience function to extract all the blobs (and their handles)
286  /// The string handles are guaranteed to be in ascending order, but
287  /// may or may not be contiguous.
289  UT_IntArray &handles) const
290  {
291  return myBlobs.extractBlobs(blobs, handles);
292  }
294  UT_IntArray &handles, exint maxblobs) const
295  {
296  return myBlobs.extractBlobs(blobs, handles, maxblobs);
297  }
298 
299  /// Grow or shrink the array size
300  virtual bool setArraySize(GA_Offset new_size);
301 
302  /// Try to compress data pages
303  virtual void tryCompressAllPages(
304  GA_Offset start_offset = GA_Offset(0),
305  GA_Offset end_offset = GA_INVALID_OFFSET);
306  /// Harden data pages
307  virtual void hardenAllPages(
308  GA_Offset start_offset = GA_Offset(0),
309  GA_Offset end_offset = GA_INVALID_OFFSET);
310 
311  /// Returns true iff that is an attribute whose content can be copied
312  /// from this without any type conversions. This is important to
313  /// avoid reallocation of an attribute if its storage type,
314  /// including tuple size, matches the source attribute exactly.
315  virtual bool matchesStorage(const GA_Attribute *that) const
316  {
317  if (!GA_Attribute::matchesStorage(that))
318  return false;
319  const GA_ATIBlob *thatn = UTverify_cast<const GA_ATIBlob *>(that);
320  if (getTupleSize() != thatn->getTupleSize())
321  return false;
322  return true;
323  }
324 
325  /// This replaces the entirety of this attribute's content and non-
326  /// storage metadata (except the name) with that of the src attribute.
327  /// matchesStorage(src) should already return true.
328  /// This is primarily for use by GA_AttributeSet::replace().
329  /// NOTE: The internal content sizes may not match exactly if the
330  /// attribute type may overallocate, but the sizes should be such
331  /// that any real data will fit in the destination, so be careful
332  /// and deal with the myTailInitialize flag appropriately if
333  /// any extra elements aren't equal to the default.
334  virtual void replace(const GA_Attribute &src);
335 
336  /// Copy attribute values for a single element.
337  /// @{
338  virtual bool copy(GA_Offset desti, GA_Offset srci) final
339  {
340  copyData(desti, this, srci);
341  return true;
342  }
343  virtual bool copy(GA_Offset desti, const GA_Attribute &src, GA_Offset srci) final
344  {
345  if (!GA_ATIBlob::isType(&src))
346  return false;
347  copyData(desti, UTverify_cast<const GA_ATIBlob *>(&src), srci);
348  return true;
349  }
350  bool copy(GA_Offset desti, const GA_ATIBlob &src, GA_Offset srci)
351  {
352  copyData(desti, &src, srci);
353  return true;
354  }
355  /// @}
356 
357  /// Copy attribute values for a range of elements.
358  /// @{
359  virtual bool copy(const GA_Range &destrange, const GA_Range &srcrange) final
360  {
361  return copyData(destrange, this, srcrange);
362  }
363  virtual bool copy(const GA_Range &destrange, const GA_Attribute &src, const GA_Range &srcrange) final
364  {
365  if (!GA_ATIBlob::isType(&src))
366  return false;
367  return copyData(destrange, UTverify_cast<const GA_ATIBlob*>(&src), srcrange);
368  }
369  bool copy(const GA_Range &destrange, const GA_ATIBlob &src, const GA_Range &srcrange)
370  {
371  return copyData(destrange, &src, srcrange);
372  }
373  /// @}
374 
375  /// Assign all elements of a range from a single attribute value.
376  /// @{
377  virtual bool fill(const GA_Range &destrange, GA_Offset srci) final
378  {
379  fillData(destrange, this, srci);
380  return true;
381  }
382  virtual bool fill(const GA_Range &destrange, const GA_Attribute &src, GA_Offset srci) final
383  {
384  if (!GA_ATIBlob::isType(&src))
385  return false;
386  fillData(destrange, UTverify_cast<const GA_ATIBlob *>(&src), srci);
387  return true;
388  }
389  bool fill(const GA_Range &destrange, const GA_ATIBlob &src, GA_Offset srci)
390  {
391  fillData(destrange, &src, srci);
392  return true;
393  }
394  /// @}
395 
396  /// Validates the internal structure for debugging purposes.
397  bool validate() const;
398 
400 
401 protected: // Methods
402  /// Grow or shrink the tuple size
403  virtual bool setTupleSize(int size);
404 
405  /// Blob attributes need each element to properly destruct for accurate
406  /// reference counting.
407  virtual bool needDestruction() const;
408 
409  /// Callback method to destruct an offset.
410  virtual void destructElement(GA_Offset offset);
411 
412  /// Create a new ATIBlob attribute. Sub-classes must implement this.
413  virtual GA_Attribute *doClone(const GA_IndexMap &index_map,
414  const UT_StringHolder &name) const;
415 
416  /// @{ GA_AIFMerge
417  /// Base class implementation of GA_AIFMerge::destroyDestination()
418  void mergeDestroyDestination(const GA_MergeMap &map,
419  GA_Attribute *dattrib) const;
420  /// Base class implementation of GA_AIFMerge::addDestination()
421  GA_Attribute *mergeAddDestination(const GA_MergeMap &map,
422  GA_Attribute *dattrib) const;
423  /// Base class implementation of GA_AIFMerge::growArray()
424  void mergeGrowArray(const GA_MergeMap &map, const GA_ATIBlob &s);
425 
426  /// Base class implementation of GA_AIFMerge::copyArray()
427  bool mergeAppendData(const GA_MergeMap &map,
428  const GA_Attribute *sattrib);
429  /// @}
430 
431  /// @{
432  /// Methods to implement copying of data for AIFCopyData
433  bool copyData(GA_Offset di,
434  const GA_ATIBlob *s,
435  GA_Offset si);
436  bool copyData(const GA_Range &di,
437  const GA_ATIBlob *s,
438  const GA_Range &si);
439  bool fillData(const GA_Range &di,
440  const GA_ATIBlob *s,
441  GA_Offset si);
442  /// @}
443 
444  /// @{
445  /// The addBlobBuffer()/delBlobBuffer() methods are added solely for the
446  /// corresponding methods in GA_AIFBlob.
447  GA_BlobIndex addBlobReference(const GA_BlobRef &blob);
448  void delBlobReference(GA_BlobIndex handle);
449  /// @}
450 
451  /// @{
452  /// Interface used by AIFCompare. By default, this will use the blob key
453  /// comparison to determine equality.
454  virtual bool isEqual(GA_Offset offset,
455  const GA_ATIBlob &b, GA_Offset b_offset) const;
456  virtual bool isEqual(const GA_Range & range,
457  const GA_ATIBlob &b, const GA_Range &b_range) const;
458  /// @}
459 
460 protected: // Data
461  /// Array of handles. The default value is -1.
462  /// This is protected for convenience to sub-classes.
464 
465  /// Blob references. This is protected for convenience to sub-classes.
467 
468 private:
469  /// Load up an array of blob
470  bool jsonLoadBlobs(UT_JSONParser &p,
471  const GA_LoadMap &load,
472  UT_Array<GA_BlobRef> &blobs,
473  const GA_BlobDataLoader &blobloader);
474 #if 0
475  /// Add references for the indices referenced by the elements in the
476  /// range optimized for the native format of myHandles.
477  template <typename T>
478  void addReferencesNativeImpl(const GA_Range &range);
479 #endif
480 
481  /// AIF Merge interface
482  static GA_AIFBlob *myAIFBlob;
483  static GA_AIFMerge *myAIFMerge;
484  static GA_AIFCopyData *myAIFCopyData;
485  static GA_AIFCompare *myAIFCompare;
486  static GA_AIFInterp *myAIFInterp;
487 
488  static const GA_AttributeType *theAttributeType;
489 
490  /// @cond INTERNAL_DOX
491  friend class ga_BlobBlob;
492  friend class ga_BlobMerge;
493  friend class ga_BlobCopyData;
494  friend class ga_BlobCompare;
495  /// @endcond
496 };
497 
498 #if !GA_NEW_STRING_DATA_STRUCTURE
499 // NOTE: It may seem strange to include GA_ATIString.h here,
500 // but GA_ATIBlob::isType() and cast() need GA_ATIString::isType(),
501 // and GA_ATIString inherits from GA_ATIBlob, so
502 // GA_ATIBlob::isType() and cast() are defined in GA_ATIString.h
503 // below the class.
504 #include "GA_ATIString.h"
505 #endif
506 
507 #endif
fpreal getStorageOccupancy()
Get a measure of the vacancy entropy of the storage container. This.
Definition: GA_ATIBlob.h:245
A class to manage an ordered array which has fixed offset handles.
Definition: GA_IndexMap.h:63
HandleArrayType myHandles
Definition: GA_ATIBlob.h:463
Definition of a geometry attribute.
Definition: GA_Attribute.h:190
GLenum GLint * range
Definition: glcorearb.h:1924
Used to pass options and map offset values during saving.
Definition: GA_SaveMap.h:48
virtual bool copy(const GA_Range &destrange, const GA_Attribute &src, const GA_Range &srcrange) final
Definition: GA_ATIBlob.h:363
int getTupleSize() const
Size of the AIFTuple, if it exists. If it doesn't, 1.
bool fill(const GA_Range &destrange, const GA_ATIBlob &src, GA_Offset srci)
Definition: GA_ATIBlob.h:389
SYS_FORCE_INLINE GA_BlobIndex getBlobIndex(GA_Offset offset, int tuple_index=0) const
Look up a blob handle by offset.
Definition: GA_ATIBlob.h:186
The merge map keeps track of information when merging details.
Definition: GA_MergeMap.h:53
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:75
virtual bool setArraySize(GA_Offset size)=0
A simple ATI to store aribtrary "blobs" of data in an attribute.
Definition: GA_ATIBlob.h:94
#define GA_API
Definition: GA_API.h:12
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:32
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
Definition: UT_Assert.h:199
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const =0
Standard user attribute level.
Definition: GA_Types.h:127
virtual int64 getMemoryUsage(bool inclusive) const =0
virtual bool matchesStorage(const GA_Attribute *that) const
Definition: GA_Attribute.h:677
virtual void tryCompressAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
SYS_FORCE_INLINE GA_BlobRef getBlob(GA_Offset offset, int tuple_idx=0) const
Definition: GA_ATIBlob.h:205
GLsizeiptr size
Definition: glcorearb.h:663
#define GA_INVALID_OFFSET
Definition: GA_Types.h:654
A range of elements in an index-map.
Definition: GA_Range.h:42
static SYS_FORCE_INLINE const GA_ATIBlob * cast(const GA_Attribute *attrib)
Definition: GA_ATIBlob.h:118
virtual bool copy(GA_Offset desti, GA_Offset srci) final
Definition: GA_ATIBlob.h:338
GA_Size GA_Offset
Definition: GA_Types.h:617
long long int64
Definition: SYS_Types.h:107
static GA_Attribute * create(const GA_IndexMap &index_map, const UT_StringHolder &name, int tuple_size)
Definition: GA_ATIBlob.h:138
GA_AttributeScope
Definition: GA_Types.h:121
virtual bool needDestruction() const
Methods which can be overridden from GA_Attribute.
virtual bool matchesStorage(const GA_Attribute *that) const
Definition: GA_ATIBlob.h:315
SYS_FORCE_INLINE int getTupleSize() const
Get the tuple size.
Definition: GA_ATIBlob.h:167
Attribute Interface for accessing generic blob data.
Definition: GA_AIFBlob.h:39
int entries() const
Return the entries in the blob container.
Definition: GA_ATIBlob.h:171
Utility class to load blob data from a JSON stream.
Definition: GA_ATIBlob.h:58
virtual void replace(const GA_Attribute &src)=0
Attribute Interface for merging attribute data between details.
Definition: GA_AIFMerge.h:56
UT_IndexedHashMapItemId GA_BlobIndex
int64 exint
Definition: SYS_Types.h:116
SYS_FORCE_INLINE const GA_BlobData * getRawBlob(GA_Offset offset, int tuple_idx=0) const
Definition: GA_ATIBlob.h:210
SYS_FORCE_INLINE const GA_BlobData * lookupRawBlob(GA_BlobIndex handle) const
Definition: GA_ATIBlob.h:232
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
GLintptr offset
Definition: glcorearb.h:664
static SYS_FORCE_INLINE GA_ATIBlob * cast(GA_Attribute *attrib)
Definition: GA_ATIBlob.h:111
#define GA_INVALID_BLOB_INDEX
Attribute Interface class to perform comparisons on attributes.
Definition: GA_AIFCompare.h:27
Options during loading.
Definition: GA_LoadMap.h:42
Defragmentation of IndexMaps.
Definition: GA_Defragment.h:45
virtual const GA_AIFInterp * getAIFInterp() const
Return the attribute's interpolation interface or NULL.
Definition: GA_ATIBlob.h:257
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual WriteConcurrence getSupportedWriteConcurrence() const
Definition: GA_ATIBlob.h:250
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
int capacity() const
Return the capacity of the blob container.
Definition: GA_ATIBlob.h:181
const GA_AttributeType & getType() const
Definition: GA_Attribute.h:198
GA_BlobRef getOrderedBlob(exint idx) const
Lookup a blob given an ordered index.
Definition: GA_ATIBlob.h:237
GA_PageArray< int32 > HandleArrayType
Definition: GA_ATIBlob.h:399
double fpreal
Definition: SYS_Types.h:270
A map of string to various well defined value types.
Definition: UT_Options.h:42
virtual bool fill(const GA_Range &destrange, const GA_Attribute &src, GA_Offset srci) final
Definition: GA_ATIBlob.h:382
virtual ~GA_BlobDataLoader()
Definition: GA_ATIBlob.h:61
static SYS_FORCE_INLINE bool isType(const GA_Attribute *attrib)
Definition: GA_ATIBlob.h:106
virtual bool fill(const GA_Range &destrange, GA_Offset srci) final
Definition: GA_ATIBlob.h:377
virtual bool copy(const GA_Range &destrange, const GA_Range &srcrange) final
Definition: GA_ATIBlob.h:359
bool copy(const GA_Range &destrange, const GA_ATIBlob &src, const GA_Range &srcrange)
Definition: GA_ATIBlob.h:369
SYS_FORCE_INLINE GA_BlobRef lookupBlob(GA_BlobIndex handle) const
Definition: GA_ATIBlob.h:228
Concurrent writes to separate pages supported.
Definition: GA_Attribute.h:335
GA_BlobContainer myBlobs
Blob references. This is protected for convenience to sub-classes.
Definition: GA_ATIBlob.h:466
virtual void compactStorage()
int extractBlobs(UT_Array< GA_BlobRef > &blobs, UT_IntArray &handles) const
Definition: GA_ATIBlob.h:288
virtual const GA_AIFCompare * getAIFCompare() const
Return the attribute's comparison interface or NULL.
Definition: GA_ATIBlob.h:255
bool copy(GA_Offset desti, const GA_ATIBlob &src, GA_Offset srci)
Definition: GA_ATIBlob.h:350
static SYS_FORCE_INLINE const GA_AttributeType & getType()
Definition: GA_ATIBlob.h:102
virtual const GA_AIFMerge * getAIFMerge() const
Return the attribute's merge interface or NULL.
Definition: GA_ATIBlob.h:254
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual void destructElement(GA_Offset offset)
Callback invoked if needsDestruction() returns true.
Attribute Interface class to copy attribute data.
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
virtual bool copy(GA_Offset desti, const GA_Attribute &src, GA_Offset srci) final
Definition: GA_ATIBlob.h:343
GA_BlobIndex getMaximumIndex() const
Definition: GA_ATIBlob.h:177
static SYS_FORCE_INLINE const UT_StringHolder & getTypeName()
Definition: GA_ATIBlob.h:99
virtual const GA_AIFCopyData * getAIFCopyData() const
Return the attribute's copy interface or NULL.
Definition: GA_ATIBlob.h:256
virtual void hardenAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
virtual void defragment(const GA_Defragment &defrag)=0
int extractBlobs(UT_Array< GA_BlobRef > &blobs, UT_IntArray &handles, exint maxblobs) const
Definition: GA_ATIBlob.h:293
virtual const GA_AIFBlob * getAIFBlob() const
Return the attribute's blob interface or NULL.
Definition: GA_ATIBlob.h:253
Container to store blobs of arbitrary data for attributes.
GLenum src
Definition: glcorearb.h:1792
virtual void reconstructElementBlock(GA_Offset offset, GA_Offset nelements)