11 #ifndef __GA_AIFSharedStringArray__
12 #define __GA_AIFSharedStringArray__
46 virtual bool compactStorage(
GA_Attribute *attrib)
const = 0;
76 if (attrib && getStatistics(attrib, stats))
89 virtual const char *getTableString(
const GA_Attribute *attrib,
95 const char *
string)
const = 0;
103 virtual const char *getTableOrderedString(
const GA_Attribute *
a,
119 const char *
string)
const = 0;
137 myAttrib = src.myAttrib;
138 myString = src.myString;
139 myCount = src.myCount;
140 myIndex = src.myIndex;
149 return myAIF == src.myAIF &&
150 myAttrib == src.myAttrib &&
151 myCount == src.myCount &&
152 myIndex == src.myIndex;
162 bool atEnd()
const {
return myIndex >= myCount; }
176 while (myIndex < myCount)
178 myString = myAIF->getTableString(myAttrib,
191 , myCount(aif ? aif->getTableEntries(a) : 0)
198 const char *myString;
212 const char *
string)
const = 0;
Definition of a geometry attribute.
bool set(GA_Attribute *attrib, GA_Offset o, const UT_StringArray &v) const
GLsizei GLenum const void * indices
virtual void delHandleReference(GA_Attribute *attribute, GA_StringIndexType handle) const =0
Decrement reference to a handle.
GLboolean GLboolean GLboolean GLboolean a
iterator & operator++(int)
GA_StringIndexType getHandle() const
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_Size getTableEntries(const GA_Attribute *attrib) const
Return the number of entries in the shared string table.
A range of elements in an index-map.
const char * getString() const
virtual exint arraySize(const GA_Attribute *atr, GA_Offset off) const =0
Return the size of the array for the GA_Offset.
virtual GA_StringIndexType addStringReference(GA_Attribute *attribute, const char *string) const =0
Add (or increment) reference to a string.
virtual GA_Storage getStorage(const GA_Attribute *attrib) const =0
virtual void getStringIndex(const GA_Attribute *attribute, GA_Offset offset, UT_Array< GA_StringIndexType > &indices) const =0
Get the handle from the array for a single tuple of an element.
virtual int getTupleSize(const GA_Attribute *attrib) const =0
virtual void setStringIndex(GA_Attribute *attribute, GA_Offset offset, const UT_Array< GA_StringIndexType > &indices) const =0
Set a single component for a range of elements.
A specialization of GA_AIFStringArray to access "shared strings".
virtual void setString(GA_Attribute *attribute, GA_Offset offset, const UT_StringArray &strings) const =0
Set a single component for a single element.
GA_Size getCapacity() const
GLsizei const GLchar *const * strings
bool operator==(const iterator &src)
virtual void getString(const GA_Attribute *attribute, GA_Offset offset, UT_StringArray &strings) const =0
Get a single string from the array for a single tuple of an element.
virtual bool setTupleSize(GA_Attribute *attrib, int size) const =0
GA_BlobIndex GA_StringIndexType
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
Class to iterate over all the strings in the shared string table.
iterator begin(const GA_Attribute *a) const
iterator & operator=(const iterator &src)