11 #ifndef __GA_AttributeRef__
12 #define __GA_AttributeRef__
46 {
UT_ASSERT(myAttribute);
return *myAttribute; }
49 {
return myAttribute; }
58 (myAttribute == src.myAttribute);
64 ( myAttribute != src.myAttribute);
87 {
if (!getAIFTuple())
return false;
88 return GAisFloatStorage(getAIFTuple()->getStorage(
get())); }
90 {
if (!getAIFTuple())
return false;
91 return GAisIntStorage(getAIFTuple()->getStorage(
get())); }
93 {
if (getAIFTuple())
return false;
94 if (getAIFStringTuple())
return true;
95 if (getAIFSharedStringArray())
return true;
98 {
if (getAIFSharedDictTuple())
return true;
99 if (getAIFSharedDictArray())
return true;
103 {
if (getAIFTuple()) {
return GAstorageClass(getAIFTuple()->getStorage(
get())); }
106 if (getAIFNumericArray()) {
return GAstorageClass(getAIFNumericArray()->getStorage(
get())); }
115 {
if (getAIFTuple()) {
return getAIFTuple()->getTupleSize(
get()); }
116 if (getAIFStringTuple()) {
return getAIFStringTuple()->getTupleSize(
get()); }
117 if (getAIFSharedStringArray()) {
return getAIFSharedStringArray()->getTupleSize(
get()); }
118 if (getAIFNumericArray()) {
return getAIFNumericArray()->getTupleSize(
get()); }
119 if (getAIFSharedDictTuple()) {
return getAIFSharedDictTuple()->getTupleSize(
get()); }
120 if (getAIFSharedDictArray()) {
return getAIFSharedDictArray()->getTupleSize(
get()); }
124 {
if (getAIFTuple()) { getAIFTuple()->setTupleSize(
get(), size); }
125 if (getAIFStringTuple()) { getAIFStringTuple()->setTupleSize(
get(), size); }
126 if (getAIFNumericArray()) { getAIFNumericArray()->setTupleSize(
get(), size); }
127 if (getAIFSharedDictTuple()) { getAIFSharedDictTuple()->setTupleSize(
get(), size); }
155 return myStringTuple;
160 return get()->getAIFSharedDictTuple();
166 return get()->getAIFSharedDictArray();
176 return get()->getAIFNumericArray();
182 return get()->getAIFSharedStringArray();
190 const GA_AIFInterp *myInterp;
227 myAttribute = src.myAttribute;
229 myCopyData = src.myCopyData;
230 myInterp = src.myInterp;
231 myTuple = src.myTuple;
232 myStringTuple = src.myStringTuple;
233 myIndexPair = src.myIndexPair;
238 {
UT_ASSERT(myAttribute);
return *myAttribute; }
241 {
return myAttribute; }
248 myAttribute = src.myAttribute;
250 myCopyData = src.myCopyData;
251 myInterp = src.myInterp;
252 myTuple = src.myTuple;
253 myStringTuple = src.myStringTuple;
254 myIndexPair = src.myIndexPair;
262 (myAttribute == src.myAttribute);
268 (myAttribute != src.myAttribute);
292 {
if (!getAIFTuple())
return false;
293 return GAisFloatStorage(getAIFTuple()->getStorage(
get())); }
295 {
if (!getAIFTuple())
return false;
296 return GAisIntStorage(getAIFTuple()->getStorage(
get())); }
298 {
if (getAIFTuple())
return false;
299 if (getAIFStringTuple())
return true;
300 if (getAIFSharedStringArray())
return true;
303 {
if (getAIFSharedDictTuple())
return true;
311 if (getAIFStringTuple())
313 if (getAIFSharedStringArray())
315 if (getAIFSharedDictTuple())
317 if (getAIFNumericArray())
327 return getAIFTuple()->getTupleSize(
get());
328 if (getAIFSharedStringArray())
329 return getAIFSharedStringArray()->getTupleSize(
get());
330 if (getAIFStringTuple())
331 return getAIFStringTuple()->getTupleSize(
get());
332 if (getAIFNumericArray())
333 return getAIFNumericArray()->getTupleSize(
get());
334 if (getAIFSharedDictTuple())
335 return getAIFSharedDictTuple()->getTupleSize(
get());
364 return myStringTuple;
369 return get()->getAIFNumericArray();
375 return get()->getAIFSharedStringArray();
382 return get()->getAIFSharedDictTuple();
396 const char *getString(
GA_Offset element_index,
397 int tuple_index=0)
const;
402 const GA_AIFInterp *myInterp;
const GA_AIFIndexPair * getAIFIndexPair() const
const GA_AIFSharedStringArray * getAIFSharedStringArray() const
void setTupleSize(int size)
GA_API const char * GAstorageClass(GA_StorageClass store)
Lookup the storage name from the storage type.
Definition of a geometry attribute.
const GA_AIFIndexPair * getAIFIndexPair() const
const GA_AIFNumericArray * getAIFNumericArray() const
const GA_AIFSharedDictTuple * getAIFSharedDictTuple() const
Generic Attribute Interface class to access an attribute as a array.
Generic Attribute Interface class to get/set data as index pairs.
GA_Attribute * getAttribute() const
A specialization of GA_AIFDictTuple to access "shared strings".
This class provides a way to manage a reference to an attribute permitting Write-Only access...
Attribute Interface class to perform numeric operations on attributes.
bool isInvalid() const
Test to see if the attribute reference refers to a valid attribute.
const GA_AIFStringTuple * getAIFStringTuple() const
GA_Attribute & operator*() const
Define the * operator to dereference the attribute.
const GA_AIFStringTuple * getAIFStringTuple() const
const GA_AIFMath * getAIFMath() const
const GA_Attribute * operator->() const
An -> operator to access the attribute.
const GA_AIFTuple * getAIFTuple() const
bool isValid() const
Test to see if the attribute reference refers to a valid attribute.
const GA_AIFTuple * getAIFTuple() const
bool isInvalid() const
Test to see if the attribute reference refers to a valid attribute.
This class provides a way to manage a reference to an attribute permitting Read-Write access...
GA_ROAttributeRef & operator=(const GA_RWAttributeRef &src)
GA_ROAttributeRef(const GA_RWAttributeRef &src)
Conversion constructor (implicit)
const GA_AIFCopyData * getAIFCopyData() const
This class provides a way to manage a reference to an attribute permitting Read-Only access...
const GA_AIFSharedStringArray * getAIFSharedStringArray() const
const GA_AIFCopyData * getAIFCopyData() const
A specialization of GA_AIFStringArray to access "shared strings".
const GA_AIFNumericArray * getAIFNumericArray() const
bool isFloat() const
Determine the storage type of the underlying attribute.
const GA_Attribute & operator*() const
Define the * operator to dereference the attribute.
bool operator==(const GA_ROAttributeRef &src) const
Comparison operator.
GA_Attribute * operator->() const
Define the -> operator to access the attribute.
const GA_AIFSharedDictTuple * getAIFSharedDictTuple() const
bool isFloat() const
Determine the storage type of the underlying attribute.
LeafData & operator=(const LeafData &)=delete
A specialization of GA_AIFDictArray to access "shared strings".
A specialization of GA_AIFStringTuple to access "shared strings".
const GA_AIFSharedDictArray * getAIFSharedDictArray() const
const GA_AIFInterp * getAIFInterp() const
GA_StorageClass getStorageClass() const
GA_StorageClass getStorageClass() const
Attribute Interface class to copy attribute data.
Generic Attribute Interface class to access an attribute as a tuple.
bool operator==(const GA_WOAttributeRef &src) const
Comparison operator.
bool operator!=(const GA_WOAttributeRef &src) const
Comparison operator.
const GA_AIFInterp * getAIFInterp() const
const GA_AIFMath * getAIFMath() const
bool isValid() const
Test to see if the attribute reference refers to a valid attribute.
Generic Attribute Interface class to work with string indices directly, rather than string values...
const GA_Attribute * getAttribute() const
bool operator!=(const GA_ROAttributeRef &src) const
Comparison operator.