11 #ifndef __GT_DAIndexedString__
12 #define __GT_DAIndexedString__
32 const
char *className()
const override
33 {
return "GT_DAIndexedString"; }
47 return myStrings.getMemoryUsage() +
48 sizeof(
int32)*mySize*myTupleSize;
50 return sizeof(
int32)*mySize*myTupleSize;
58 offset = offset*myTupleSize +
index;
65 offset = offset*myTupleSize +
index;
72 offset = offset*myTupleSize +
index;
79 offset = offset*myTupleSize +
index;
86 offset = offset*myTupleSize +
index;
93 offset = offset*myTupleSize +
index;
100 offset = offset * myTupleSize +
index;
106 return myStrings.getItemIdUpperBound()+1;
110 return getI32(offset, idx);
127 mySize*myTupleSize*
sizeof(
int32));
132 for (
GT_Size i = size; i < mySize; ++i)
139 mySize*myTupleSize*
sizeof(
int32),
140 size*myTupleSize*
sizeof(
int32));
144 myData[i*myTupleSize+
j] = -1;
155 freeString(offset, index);
158 offset = offset * myTupleSize +
index;
160 myData[
offset] = myStrings.add(str);
161 myStrings.remove(old_id);
169 offset = offset*myTupleSize +
index;
173 myStrings.addReference(new_id);
174 myStrings.remove(old_id);
182 offset = offset*myTupleSize +
index;
183 if (myData[offset] >= 0)
185 myStrings.remove(myData[offset]);
void setString(GT_Size offset, int index, const GT_String &str)
Set an index to a value.
void setStringIndex(GT_Size offset, int index, GT_Offset str_id)
Directly set the string index for a particular entry.
GT_Offset getDictIndex(GT_Offset, int) const override
GLsizei GLenum const void * indices
fpreal64 getF64(GT_Offset offset, int index=0) const override
int64 getMemoryUsage() const override
int64 getI64(GT_Offset offset, int index=0) const override
void getIndexedDicts(UT_Array< UT_OptionsHolder > &, UT_IntArray &) const override
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
int32 getI32(GT_Offset offset, int index=0) const override
exint UT_IndexedHashSetItemId
Each item in the shared map is assigned a unique id.
A thread-safe hash map which stores indexed shared items.
GT_DataArrayHandle harden() const override
GT_String getS(GT_Offset offset, int index) const override
GT_Type getTypeInfo() const override
Abstract data class for an array of float, int or string data.
UT_IntrusivePtr< GT_DataArray > GT_DataArrayHandle
static const UT_StringHolder theEmptyString
GT_Storage getStorage() const override
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
fpreal32 getF32(GT_Offset offset, int index=0) const override
GT_Size entries() const override
GT_Offset getStringIndex(GT_Offset offset, int idx) const override
virtual void getStrings(UT_StringArray &strings) const
GLsizei const GLchar *const * strings
uint8 getU8(GT_Offset offset, int index=0) const override
virtual void getIndexedStrings(UT_StringArray &strings, UT_IntArray &indices) const =0
fpreal16 getF16(GT_Offset offset, int index=0) const override
GT_Size getTupleSize() const override
virtual int32 getI32(GT_Offset offset, int idx=0) const =0
GT_Size getStringIndexCount() const override
void resize(GT_Size size)
GT_Size getDictIndexCount() const override