11 #ifndef __GA_AIFSharedStringTuple__
12 #define __GA_AIFSharedStringTuple__
35 #define GA_INVALID_STRING_INDEX GA_StringIndexType(-1)
71 virtual bool compactStorage(
GA_Attribute *attrib)
const = 0;
84 exint maxstrings)
const = 0;
101 if (attrib && getStatistics(attrib, stats))
114 virtual const char *getTableString(
const GA_Attribute *attrib,
120 const char *
string)
const = 0;
128 virtual const char *getTableOrderedString(
const GA_Attribute *
a,
144 const char *
string)
const = 0;
162 myAttrib = src.myAttrib;
163 myString = src.myString;
164 myCount = src.myCount;
165 myIndex = src.myIndex;
174 return myAIF == src.myAIF &&
175 myAttrib == src.myAttrib &&
176 myCount == src.myCount &&
177 myIndex == src.myIndex;
187 bool atEnd()
const {
return myIndex >= myCount; }
201 while (myIndex < myCount)
203 myString = myAIF->getTableString(myAttrib,
216 , myCount(aif ? aif->getTableEntries(a) : 0)
223 const char *myString;
237 const char *
string)
const = 0;
255 int tuple_index=0)
const;
260 int tuple_index=0)
const = 0;
269 const char *
string,
int tuple_index)
const;
272 const char *
string,
int tuple_index)
const;
276 int tuple_index)
const = 0;
280 int tuple_index)
const;
326 , myAIFSharedStringTuple(NULL)
349 const char *getString(
GA_Size i)
const;
StringBuffer(const StringBuffer &src)
Definition of a geometry attribute.
Temporary container to hold references to multiple strings.
void setEntries(GA_Size n)
virtual void delHandleReference(GA_Attribute *attribute, GA_StringIndexType handle) const =0
Decrement reference to a handle.
GA_Size entries() const
Return number of strings referenced in the string buffer.
GLboolean GLboolean GLboolean GLboolean a
GA_Size getTableEntries(const GA_Attribute *attrib) const
Return the number of entries in the shared string table.
GA_StringTableStatistics()
exint GA_Size
Defines the bit width for index and offset types in GA.
virtual GA_StringIndexType addStringReference(GA_Attribute *attribute, const char *string) const =0
Add (or increment) reference to a string.
A range of elements in an index-map.
virtual bool setHandles(GA_Attribute *attrib, GA_Offset ai, const GA_StringIndexType *handles, int count, int start=0) const
Set multiple components for a single element.
iterator & operator++(int)
~GA_StringTableStatistics()
virtual int arrayGetLength(const GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const
bool operator==(const iterator &src)
UT_IndexedHashMapItemId GA_BlobIndex
const char * getString() const
iterator & operator=(const iterator &src)
virtual bool getHandles(const GA_Attribute *attrib, GA_Offset ai, GA_StringIndexType *handles, int count, int start=0) const
Get the full tuple of indices for a single element.
GA_Size getCapacity() const
GLsizei const GLchar *const * strings
virtual bool setString(GA_Attribute *attrib, GA_Offset ai, const char *string, int tuple_index) const
Set a single component for a single element.
GA_Size getEntries() const
GA_StringIndexType getHandle() const
virtual bool setTupleSize(GA_Attribute *attrib, int size) const =0
Set the tuple size.
Class to iterate over all the strings in the shared string table.
virtual int getTupleSize(const GA_Attribute *attrib) const =0
Query the tuple size.
A specialization of GA_AIFStringTuple to access "shared strings".
GA_BlobIndex GA_StringIndexType
void setCapacity(GA_Size n)
iterator begin(const GA_Attribute *a) const
virtual bool arrayDestroyString(GA_Attribute *attrib, int string_index, GA_Offset element_index=GA_Offset(0)) const
virtual const char * getString(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.
virtual int arrayFindString(const GA_Attribute *attrib, const char *string, GA_Offset element_index=GA_Offset(0)) const
virtual bool setHandle(GA_Attribute *attrib, GA_Offset ai, GA_StringIndexType handle, int tuple_index) const =0
Set a single component for a single element.
virtual GA_StringIndexType 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.
Generic Attribute Interface class to work with string indices directly, rather than string values...