14 #ifndef __GU_AttribValueLookupTable_h__
15 #define __GU_AttribValueLookupTable_h__
35 if (idx < 0 || idx >= myIntValues.
size())
37 return myIntValues(idx);
41 if (idx < 0 || idx >= myStringValues.
size())
43 return myStringValues(idx);
47 auto it = myIntTable.find(v);
48 if (it == myIntTable.end())
54 auto it = myStringTable.find(v);
55 if (it == myStringTable.end())
62 int64 mem = inclusive ?
sizeof(*this) : 0;
67 mem += myStringTable.getMemoryUsage(
false);
68 for (
auto it = myStringTable.begin(); it != myStringTable.end(); ++it)
69 mem += it->second->getMemoryUsage(
true);
72 for (
auto it = myIntTable.begin(); it != myIntTable.end(); ++it)
73 mem += it->second->getMemoryUsage(
true);
97 auto it = myIntTable.find(v);
98 if (it == myIntTable.end())
105 auto it = myStringTable.find(v);
106 if (it == myStringTable.end())
113 int64 mem = inclusive ?
sizeof(*this) : 0;
const GA_OffsetList * getStringOffsets(const UT_StringRef &v) const
Definition of a geometry attribute.
int64 getMemoryUsage(bool inclusive) const
int64 getMemoryUsage(bool inclusive=false) const
GA_Offset getStringOffset(const UT_StringRef &v) const
int64 getMemoryUsage(bool inclusive) const
exint getIntValue(exint idx) const
~AttribSingleValueLookupTable()
AttribSingleValueLookupTable(const GA_Attribute *attrib)
#define GA_INVALID_OFFSET
AttribValueLookupTable(const GA_Attribute *attrib)
static const UT_StringHolder theEmptyString
const UT_StringHolder & getStringHolder(exint idx) const
int64 UTgetMemoryUsage(const UT_ConcurrentHashMap< K, V, H, A > &map, const bool inclusive)
~AttribValueLookupTable()
GA_Offset getIntOffset(exint v) const
int64 getMemoryUsage(bool inclusive) const
const GA_OffsetList * getIntOffsets(exint v) const