11 #ifndef __GT_DAVaryingArray__
12 #define __GT_DAVaryingArray__
46 UT_ASSERT(!values || !values->hasArrayEntries());
48 || (values && values->entries() == counts.
sumCounts()));
53 const char *
className()
const override {
return "GT_DAVaryingArray"; }
58 && !myData->hasArrayEntries()
59 && myData->entries() == myCounts.sumCounts();
67 return myCounts.getCount(offset);
72 return myData->getMemoryUsage() + myCounts.getMemoryUsage();
78 return myCounts.sumCounts();
81 #define IMPL_GET(TYPE, METHOD) \
82 TYPE METHOD(GT_Offset off, int idx) const override { \
83 auto offcount = myCounts.getOffsetCount(off); \
84 if (offcount.second == 0) return 0; \
85 return myData->METHOD(offcount.first, idx); \
101 {
return myData->getStringIndexCount(); }
104 {
return myData->getIndexedStrings(strings, indices); }
113 {
return myData->getDictIndexCount(); }
116 {
return myData->getIndexedDicts(dicts, indices); }
127 {
return arrayImport(a, off); }
129 {
return arrayImport(a, off); }
131 {
return arrayImport(a, off); }
133 {
return arrayImport(a, off); }
135 {
return arrayImport(a, off); }
137 {
return arrayImport(a, off); }
139 {
return arrayImport(a, off); }
141 {
return arrayImport(a, off); }
143 { arrayImport(a, off); }
145 { arrayImport(a, off); }
147 { arrayImport(a, off); }
149 { arrayImport(a, off); }
151 { arrayImport(a, off); }
153 { arrayImport(a, off); }
155 { arrayImport(a, off); }
157 { arrayImport(a, off); }
166 template <
typename T>
bool
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GT_Size itemSize(GT_Offset offset) const override
Return the number of elements in the array for the given item.
GLsizei GLenum const void * indices
void doImportArray(GT_Offset off, UT_ValArray< uint8 > &a) const override
GT_Size getDictIndexCount() const override
virtual void fillStringArray(UT_StringArray &data, UT_ValArray< int > &sizes, GT_Offset start, GT_Size length) const
GT_DataArrayHandle myData
GT_Size entries() const override
Number of entries in the array.
void getIndexedStrings(UT_StringArray &strings, UT_IntArray &indices) const override
GLboolean GLboolean GLboolean GLboolean a
GLuint GLsizei GLsizei * length
bool isValid() const override
bool getIA16(UT_ValArray< int16 > &a, GT_Offset off) const override
void doImportArray(GT_Offset off, UT_ValArray< int64 > &a) const override
GT_DAVaryingArray(const GT_DataArrayHandle &values, const GT_CountArray &counts)
bool hasArrayEntries() const override
void doImportArray(GT_Offset off, UT_ValArray< fpreal16 > &a) const override
void doImportArray(GT_Offset off, UT_ValArray< int8 > &a) const override
GT_Size getTotalArrayEntries() const override
bool getFA64(UT_ValArray< fpreal64 > &a, GT_Offset off) const override
bool getFA16(UT_ValArray< fpreal16 > &a, GT_Offset off) const override
GT_Size getStringIndexCount() const override
virtual bool getSA(UT_StringArray &a, GT_Offset offset) const
void doImportArray(GT_Offset off, UT_ValArray< int32 > &a) const override
bool getIA64(UT_ValArray< int64 > &a, GT_Offset off) const override
const char * className() const override
exint getMemoryUsage() const override
GLsizei const GLchar *const * strings
#define IMPL_GET(TYPE, METHOD)
bool getFA32(UT_ValArray< fpreal32 > &a, GT_Offset off) const override
void getIndexedDicts(UT_Array< UT_OptionsHolder > &dicts, UT_IntArray &indices) const override
bool getIA32(UT_ValArray< int32 > &a, GT_Offset off) const override
void doImportArray(GT_Offset off, UT_ValArray< int16 > &a) const override
Base class for a data array which references another data array.
bool getUA8(UT_ValArray< uint8 > &a, GT_Offset off) const override
void doImportArray(GT_Offset off, UT_ValArray< fpreal64 > &a) const override
GLenum GLsizei GLsizei GLint * values
const GT_CountArray & counts() const
A array of arrays as values. Each item is an array of 0 or more items.
bool getIA8(UT_ValArray< int8 > &a, GT_Offset off) const override
virtual void fillDictionaryArray(UT_Array< UT_OptionsHolder > &data, UT_ValArray< int > &sizes, GT_Offset start, GT_Size length) const
void doImportArray(GT_Offset off, UT_ValArray< fpreal32 > &a) const override
GT_Size sumCounts() const
Return the sum of all the counts.
virtual bool getDictA(UT_Array< UT_OptionsHolder > &a, GT_Offset offset) const
const GT_DataArrayHandle & values() const