HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_AIFStringTuple Class Referenceabstract

Generic Attribute Interface class to work with string indices directly, rather than string values. More...

#include <GA_AIFStringTuple.h>

+ Inheritance diagram for GA_AIFStringTuple:

Public Member Functions

 GA_AIFStringTuple ()
 
virtual ~GA_AIFStringTuple ()
 
virtual int getTupleSize (const GA_Attribute *attrib) const =0
 Query the tuple size. More...
 
virtual bool setTupleSize (GA_Attribute *attrib, int size) const =0
 Set the tuple size. More...
 
virtual const char * getString (const GA_Attribute *attrib, GA_Offset ai, int tuple_index=0) const =0
 Get a single string from the array for a single tuple of an element. More...
 
virtual bool getStrings (const GA_Attribute *attrib, GA_Offset ai, UT_StringArray &strings, int count, int start=0) const
 Get the full tuple of string values for a single element. More...
 
virtual bool setString (GA_Attribute *attrib, GA_Offset ai, const char *string, int tuple_index) const =0
 Set a single component for a single element. More...
 
virtual bool setString (GA_Attribute *attrib, const GA_Range &ai, const char *string, int tuple_index) const
 Set a single component for a range of elements. More...
 
virtual bool setStrings (GA_Attribute *attrib, GA_Offset ai, const char **strings, int count, int start=0) const
 Set multiple components for a single element. More...
 
virtual bool setStrings (GA_Attribute *attrib, const GA_Range &ai, const char **strings, int count, int start=0) const
 Set multiple components for a range of elements. More...
 
virtual bool arrayReserve (GA_Attribute *attrib, int length) const
 Reserve space in the array. More...
 
virtual bool arrayTruncate (GA_Attribute *attrib, int length) const
 Truncate the array to the given entries. More...
 
virtual int arrayTrim (GA_Attribute *attrib) const
 
virtual int arrayAppendString (GA_Attribute *attrib, const char *string, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayAppendUniqueString (GA_Attribute *attrib, const char *string, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayGetLength (const GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayGetMaxLength (const GA_Attribute *attrib, const GA_Range &range) const
 Find the maximum length of all elements in the range. More...
 
virtual const char * arrayGetString (const GA_Attribute *attrib, int string_index, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayGetStrings (UT_StringArray &strings, const GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayFindString (const GA_Attribute *attrib, const char *string, GA_Offset element_index=GA_Offset(0)) const
 
virtual bool arrayDestroyString (GA_Attribute *attrib, int string_index, GA_Offset element_index=GA_Offset(0)) const
 
virtual int arrayRemoveDuplicates (GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const
 

Detailed Description

Generic Attribute Interface class to work with string indices directly, rather than string values.

This class provides the interface to access string table data. Each attribute type may provide this interface if it makes sense.

Definition at line 26 of file GA_AIFStringTuple.h.

Constructor & Destructor Documentation

GA_AIFStringTuple::GA_AIFStringTuple ( )
virtual GA_AIFStringTuple::~GA_AIFStringTuple ( )
virtual

Member Function Documentation

virtual int GA_AIFStringTuple::arrayAppendString ( GA_Attribute attrib,
const char *  string,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Append an index to the array. The resulting index will be returned. The element_index specifies the point, primitive, vertex etc.

virtual int GA_AIFStringTuple::arrayAppendUniqueString ( GA_Attribute attrib,
const char *  string,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Append an string to the array, but only if the string is unique in the array.

virtual bool GA_AIFStringTuple::arrayDestroyString ( GA_Attribute attrib,
int  string_index,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Delete a string from the array (by index) The element_index specifies the point, primitive, vertex etc.

Reimplemented in GA_AIFSharedStringTuple.

virtual int GA_AIFStringTuple::arrayFindString ( const GA_Attribute attrib,
const char *  string,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Find the index of a string in the array of strings (-1 if the string isn't found). The element_index specifies the point, primitive, vertex etc.

Reimplemented in GA_AIFSharedStringTuple.

virtual int GA_AIFStringTuple::arrayGetLength ( const GA_Attribute attrib,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Return the length of the array. That is, the number of strings which occupy slots in the tuple. The element_index specifies the point, primitive, vertex etc.

Reimplemented in GA_AIFSharedStringTuple.

virtual int GA_AIFStringTuple::arrayGetMaxLength ( const GA_Attribute attrib,
const GA_Range range 
) const
virtual

Find the maximum length of all elements in the range.

virtual const char* GA_AIFStringTuple::arrayGetString ( const GA_Attribute attrib,
int  string_index,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Extract a string from the array (by index) The element_index specifies the point, primitive, vertex etc.

virtual int GA_AIFStringTuple::arrayGetStrings ( UT_StringArray strings,
const GA_Attribute attrib,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Extract the list of strings from the array. Returns the number of strings extracted. The element_index specifies the point, primitive, vertex etc.

virtual int GA_AIFStringTuple::arrayRemoveDuplicates ( GA_Attribute attrib,
GA_Offset  element_index = GA_Offset(0) 
) const
virtual

Remove duplicate strings from the array The element_index specifies the point, primitive, vertex etc.

virtual bool GA_AIFStringTuple::arrayReserve ( GA_Attribute attrib,
int  length 
) const
inlinevirtual

Reserve space in the array.

Definition at line 76 of file GA_AIFStringTuple.h.

virtual int GA_AIFStringTuple::arrayTrim ( GA_Attribute attrib) const
virtual

Trim the array to the minimum required size. This may be an expensive operation as it traverses all elements to compute the minimum size, then calls truncate. The method returns the new size.

virtual bool GA_AIFStringTuple::arrayTruncate ( GA_Attribute attrib,
int  length 
) const
inlinevirtual

Truncate the array to the given entries.

Definition at line 83 of file GA_AIFStringTuple.h.

virtual const char* GA_AIFStringTuple::getString ( const GA_Attribute attrib,
GA_Offset  ai,
int  tuple_index = 0 
) const
pure virtual

Get a single string from the array for a single tuple of an element.

Implemented in GA_AIFSharedStringTuple.

virtual bool GA_AIFStringTuple::getStrings ( const GA_Attribute attrib,
GA_Offset  ai,
UT_StringArray strings,
int  count,
int  start = 0 
) const
virtual

Get the full tuple of string values for a single element.

virtual int GA_AIFStringTuple::getTupleSize ( const GA_Attribute attrib) const
pure virtual

Query the tuple size.

Implemented in GA_AIFSharedStringTuple.

virtual bool GA_AIFStringTuple::setString ( GA_Attribute attrib,
GA_Offset  ai,
const char *  string,
int  tuple_index 
) const
pure virtual

Set a single component for a single element.

Implemented in GA_AIFSharedStringTuple.

virtual bool GA_AIFStringTuple::setString ( GA_Attribute attrib,
const GA_Range ai,
const char *  string,
int  tuple_index 
) const
virtual

Set a single component for a range of elements.

Reimplemented in GA_AIFSharedStringTuple.

virtual bool GA_AIFStringTuple::setStrings ( GA_Attribute attrib,
GA_Offset  ai,
const char **  strings,
int  count,
int  start = 0 
) const
virtual

Set multiple components for a single element.

virtual bool GA_AIFStringTuple::setStrings ( GA_Attribute attrib,
const GA_Range ai,
const char **  strings,
int  count,
int  start = 0 
) const
virtual

Set multiple components for a range of elements.

virtual bool GA_AIFStringTuple::setTupleSize ( GA_Attribute attrib,
int  size 
) const
pure virtual

Set the tuple size.

Implemented in GA_AIFSharedStringTuple.


The documentation for this class was generated from the following file: