13 #ifndef __GA_ATIBlobArray__
14 #define __GA_ATIBlobArray__
48 template <
typename T>
class UT_Array;
78 static void registerType();
81 {
return theAttributeType->getTypeName(); }
117 { myHandles.defragment(defrag); }
124 {
return myHandles.findMaximumArrayLength(); }
128 {
return myHandles.getTupleSize(); }
130 { myHandles.setTupleSize(size);
return true; }
135 {
return myBlobs.entries(); }
141 {
return myBlobs.getMaximumIndex(); }
145 {
return myBlobs.capacity(); }
159 getBlobIndex(indices, offset);
163 for (
int i = 0; i < indices.
entries(); i++)
178 {
return myBlobs.getBlob(handle); }
182 {
return myBlobs.getOrderedBlob(idx); }
190 {
return myBlobs.getOccupancy(); }
198 {
return myAIFBlobArray; }
200 {
return myAIFMerge; }
202 {
return myAIFCompare;}
204 {
return myAIFCopyData;}
218 const char *blobtoken =
"data")
const;
232 const char *blobtoken =
"data");
240 return myBlobs.extractBlobs(blobs, handles);
297 void mergeDestroyDestination(
const GA_MergeMap &map,
363 friend class ga_BlobArrayBlob;
364 friend class ga_BlobArrayMerge;
365 friend class ga_BlobArrayCopyData;
366 friend class ga_BlobArrayCompare;
static SYS_FORCE_INLINE const UT_StringHolder & getTypeName()
bool setTupleSize(int size)
A class to manage an ordered array which has fixed offset handles.
GA_BlobContainer myBlobs
Blob references. This is protected for convenience to sub-classes.
Definition of a geometry attribute.
int entries() const
Return the entries in the blob container.
GLsizei GLenum const void * indices
Used to pass options and map offset values during saving.
int capacity() const
Return the capacity of the blob container.
WriteConcurrence getSupportedWriteConcurrence() const override
int getTupleSize() const
Size of the AIFTuple, if it exists. If it doesn't, 1.
GA_BlobIndex getMaximumIndex() const
GA_ArrayDataArray myHandles
Attribute Interface for accessing generic blob data.
The merge map keeps track of information when merging details.
virtual void reconstructElementBlock(GA_Offset offset, GA_Offset nelements)=0
void defragment(const GA_Defragment &defrag) override
JSON reader class which handles parsing of JSON or bJSON files.
virtual bool setArraySize(GA_Offset size)=0
Class which writes ASCII or binary JSON streams.
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const =0
Standard user attribute level.
virtual int64 getMemoryUsage(bool inclusive) const =0
virtual bool matchesStorage(const GA_Attribute *that) const
static SYS_FORCE_INLINE const GA_AttributeType & getType()
virtual void tryCompressAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
An array of array of numbers with various storage types.
#define GA_INVALID_OFFSET
A range of elements in an index-map.
virtual bool needDestruction() const
Methods which can be overridden from GA_Attribute.
exint findMaximumArrayLength() const
SYS_FORCE_INLINE const X * cast(const InstancablePtr *o)
Utility class to load blob data from a JSON stream.
virtual void replace(const GA_Attribute &src)=0
Attribute Interface for merging attribute data between details.
UT_IndexedHashMapItemId GA_BlobIndex
fpreal getStorageOccupancy()
Get a measure of the vacancy entropy of the storage container. This.
const GA_AIFInterp * getAIFInterp() const override
Return the attribute's interpolation interface or NULL.
Attribute Interface class to perform comparisons on attributes.
const GA_AIFCompare * getAIFCompare() const override
Return the attribute's comparison interface or NULL.
Defragmentation of IndexMaps.
void setCapacityIfNeeded(exint min_capacity)
GLuint const GLchar * name
GA_BlobRef getOrderedBlob(exint idx) const
Lookup a blob given an ordered index.
GLboolean GLboolean GLboolean b
exint entries() const
Alias of size(). size() is preferred.
A map of string to various well defined value types.
GA_BlobRef lookupBlob(GA_BlobIndex handle) const
Look up a blob given its handle.
void getBlob(UT_Array< GA_BlobRef > &blobs, GA_Offset offset) const
Get the blob associated with a given offset into the array.
A simple ATI to store aribtrary "blobs" of data in an attribute.
static GA_Attribute * create(const GA_IndexMap &index_map, const UT_StringHolder &name)
Concurrent writes to separate pages supported.
virtual void compactStorage()
const GA_AIFCopyData * getAIFCopyData() const override
Return the attribute's copy interface or NULL.
virtual void destructElement(GA_Offset offset)
Callback invoked if needsDestruction() returns true.
Attribute Interface class to copy attribute data.
GLubyte GLubyte GLubyte GLubyte w
bool matchesStorage(const GA_Attribute *that) const override
const GA_AIFMerge * getAIFMerge() const override
Return the attribute's merge interface or NULL.
void clear()
Resets list to an empty list.
virtual void hardenAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
const GA_AIFBlobArray * getAIFBlobArray() const override
Return the attribute's blob array interface or NULL.
int getTupleSize() const
Get the tuple size.
int extractBlobs(UT_Array< GA_BlobRef > &blobs, UT_IntArray &handles) const
Container to store blobs of arbitrary data for attributes.