11 #ifndef __GA_AIFSharedDictTuple__
12 #define __GA_AIFSharedDictTuple__
34 #define GA_INVALID_DICT_INDEX GA_DictIndexType(-1)
70 virtual bool compactStorage(
GA_Attribute *attrib)
const = 0;
95 if (attrib && getStatistics(attrib, stats))
155 myAttrib = src.myAttrib;
157 myCount = src.myCount;
158 myIndex = src.myIndex;
167 return myAIF == src.myAIF &&
168 myAttrib == src.myAttrib &&
169 myCount == src.myCount &&
170 myIndex == src.myIndex;
180 bool atEnd()
const {
return myIndex >= myCount; }
194 while (myIndex < myCount)
210 , myCount(aif ? aif->getTableEntries(a) : 0)
256 int tuple_index=0)
const;
261 int tuple_index=0)
const = 0;
271 int tuple_index)
const;
275 int tuple_index)
const;
279 int tuple_index)
const = 0;
283 int tuple_index)
const;
UT_StringHolder getString(const GA_Attribute *attrib, GA_Offset offset, int component=0, bool onlyspaces=false) const
virtual void delHandleReference(GA_Attribute *attribute, GA_DictIndexType handle) const =0
Decrement reference to a handle.
Definition of a geometry attribute.
void setEntries(GA_Size n)
A specialization of GA_AIFDictTuple to access "shared strings".
virtual bool setTupleSize(GA_Attribute *attrib, int size) const =0
Set the tuple size.
GLboolean GLboolean GLboolean GLboolean a
GA_Size getEntries() const
exint GA_Size
Defines the bit width for index and offset types in GA.
~GA_DictTableStatistics()
GA_Size getCapacity() const
A range of elements in an index-map.
GA_Size getTableEntries(const GA_Attribute *attrib) const
Return the number of entries in the shared string table.
void setCapacity(GA_Size n)
GA_DictIndexType getHandle() const
virtual int getTupleSize(const GA_Attribute *attrib) const =0
Query the tuple size.
iterator begin(const GA_Attribute *a) const
UT_IndexedHashMapItemId GA_BlobIndex
GA_BlobIndex GA_DictIndexType
virtual UT_OptionsHolder getDict(const GA_Attribute *attrib, GA_Offset ai, int tuple_index=0) const
Get a single string from the array for a single tuple of an element.
Class to iterate over all the options in the shared options table.
iterator & operator++(int)
virtual bool setDict(GA_Attribute *attrib, GA_Offset ai, const UT_OptionsHolder &opt, int tuple_index) const
Set a single component for a single element.
virtual GA_DictIndexType getHandle(const GA_Attribute *attrib, GA_Offset ai, int tuple_index=0) const =0
Get the handle from the array for a single tuple of an element.
UT_OptionsHolder getDict() const
virtual bool setHandles(GA_Attribute *attrib, GA_Offset ai, const GA_DictIndexType *handles, int count, int start=0) const
Set multiple components for a single element.
virtual bool setHandle(GA_Attribute *attrib, GA_Offset ai, GA_DictIndexType handle, int tuple_index) const =0
Set a single component for a single element.
virtual GA_DictIndexType addDictReference(GA_Attribute *attribute, const UT_OptionsHolder &opt) const =0
Add (or increment) reference to a string.
virtual bool getHandles(const GA_Attribute *attrib, GA_Offset ai, GA_DictIndexType *handles, int count, int start=0) const
Get the full tuple of indices for a single element.
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
iterator & operator=(const iterator &src)
bool operator==(const iterator &src)