24 #ifndef _GUSD_GT_VTSTRINGARRAY_H_
25 #define _GUSD_GT_VTSTRINGARRAY_H_
33 #include "pxr/base/vt/array.h"
60 {
return "GusdGT_VtStringArray"; }
105 {
return sizeof(*this) +
sizeof(
T)*_size; }
118 {
return o.
empty() ? NULL : o.c_str(); }
137 : _array(array), _size(array.
size())
145 : _size(0), _data(NULL)
154 _data = makeUnique ? _array.data() : _array.cdata();
164 _size = _array.size();
165 _UpdateDataPointer(
false);
182 {
return _GetStringFromStdString(o); }
188 {
return _GetStringFromStdString(o.
GetString()); }
194 {
return _GetStringFromStdString(o.
GetString()); }
209 for(
GT_Size i = 0; i < _size; ++i)
210 sz += _data[i].
size()*
sizeof(char);
220 for(
GT_Size i = 0; i < _size; ++i) {
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
GusdGT_VtStringArray< SdfAssetPath > GusdGT_VtAssetPathArray
GLsizei const GLchar *const * string
GT_Size getTupleSize() const override
Number of elements for each array element.
std::string const & GetString() const
Return the string that this token represents.
GusdGT_VtStringArray< std::string > GusdGT_VtStdStringArray
const std::string & GetResolvedPath() const &
void _UpdateDataPointer(bool makeUnique)
GT_Size getDictIndexCount() const override
GT_Storage getStorage() const override
Type of data stored in the array.
const ArrayType & operator*() const
GT_Offset getDictIndex(GT_Offset, int) const override
int64 getMemoryUsage() const override
Abstract data class for an array of float, int or string data.
const T & operator()(GT_Offset o) const
UT_IntrusivePtr< GT_DataArray > GT_DataArrayHandle
const std::string & GetAssetPath() const &
Return the asset path.
GT_Type getTypeInfo() const override
Return "type" information for the data. This defaults to GT_TYPE_NONE.
GT_String getString(GT_Offset o) const
GT_Offset getStringIndex(GT_Offset, int) const override
GT_DataArrayHandle harden() const override
Create a "hardened" version of the array.
SDF_API const std::string & GetString() const
void getIndexedStrings(UT_StringArray &, UT_IntArray &) const override
bool empty() const
method name that maches std::string
GT_Size getStringIndexCount() const override
GT_Size entries() const override
Number of entries in the array.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GusdGT_VtStringArray< TfToken > GusdGT_VtTokenArray
GT_String _GetString(const T &o) const
#define PXR_NAMESPACE_CLOSE_SCOPE
GT_String getS(GT_Offset o, int idx=0) const override
GusdGT_VtStringArray< SdfPath > GusdGT_VtPathArray
const char * className() const override
~GusdGT_VtStringArray() override
GT_String _GetStringFromStdString(const std::string &o) const
void getIndexedDicts(UT_Array< UT_OptionsHolder > &, UT_IntArray &) const override
GusdGT_VtStringArray< T > This