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

Attribute Interface for blind data per element. More...

#include <GA_AIFBlindData.h>

Public Types

enum  GA_BlindDataEndian { GA_BLINDDATA_LITTLE_ENDIAN, GA_BLINDDATA_BIG_ENDIAN }
 

Public Member Functions

 GA_AIFBlindData ()
 
virtual ~GA_AIFBlindData ()
 
virtual bool setDataSize (GA_Attribute *attrib, GA_Size size_in_bytes, const void *default_value=NULL) const =0
 
virtual bool setDataAlignment (GA_Attribute *attrib, GA_Size alignment_bytes) const =0
 
virtual const voidgetReadData (const GA_Attribute *attrib, GA_Offset offset) const =0
 Get a read pointer to the data for a given element. More...
 
virtual voidgetWriteData (GA_Attribute *attrib, GA_Offset offset) const =0
 Get a write pointer to the data for a given element. More...
 
template<typename T >
const TgetValue (const GA_Attribute *atr, GA_Offset off) const
 Convenience function to access value as a read-only object. More...
 
template<typename T >
TgetWriteValue (GA_Attribute *atr, GA_Offset off) const
 Convenience function to access value as a writable object. More...
 
template<typename T >
void setValue (GA_Attribute *atr, GA_Offset off, const T &value) const
 Convenience function to set value to an object. More...
 
virtual GA_Size getDataSize (const GA_Attribute *attrib) const =0
 
virtual GA_Size getDataAlignment (const GA_Attribute *attrib) const =0
 
virtual bool getSaveFlag (const GA_Attribute *a) const =0
 
virtual void setSaveFlag (GA_Attribute *a, bool save) const =0
 
virtual GA_BlindDataEndian getEndianFlag (const GA_Attribute *a) const =0
 
virtual void swapEndianFlag (GA_Attribute *a) const =0
 

Detailed Description

Attribute Interface for blind data per element.

This attribute interface allows control over a "blind" attribute. Each element is viewed as having a block of N bytes associated with it. You can get a blind pointer to this data to read/write data.

Warning
No constructor/destructors are called on the blind data, the blind data should be used for POD types like floats or ints, and only if there's no way to use friendlier attribute types.

Definition at line 31 of file GA_AIFBlindData.h.

Member Enumeration Documentation

Enumerator
GA_BLINDDATA_LITTLE_ENDIAN 
GA_BLINDDATA_BIG_ENDIAN 

Definition at line 37 of file GA_AIFBlindData.h.

Constructor & Destructor Documentation

GA_AIFBlindData::GA_AIFBlindData ( )
virtual GA_AIFBlindData::~GA_AIFBlindData ( )
virtual

Member Function Documentation

virtual GA_Size GA_AIFBlindData::getDataAlignment ( const GA_Attribute attrib) const
pure virtual

Query state of attribute

virtual GA_Size GA_AIFBlindData::getDataSize ( const GA_Attribute attrib) const
pure virtual

Query state of attribute

virtual GA_BlindDataEndian GA_AIFBlindData::getEndianFlag ( const GA_Attribute a) const
pure virtual

Query or set the endian flag.

Note
Calling swapEndian() will change the state of the endian flag, but will not swap the data (this is the caller's responsibility).
virtual const void* GA_AIFBlindData::getReadData ( const GA_Attribute attrib,
GA_Offset  offset 
) const
pure virtual

Get a read pointer to the data for a given element.

virtual bool GA_AIFBlindData::getSaveFlag ( const GA_Attribute a) const
pure virtual

Get/Set the save flag. If the save flag is set, the blind data will be saved with geometry (if the attribute supports it)

template<typename T >
const T& GA_AIFBlindData::getValue ( const GA_Attribute atr,
GA_Offset  off 
) const
inline

Convenience function to access value as a read-only object.

Definition at line 86 of file GA_AIFBlindData.h.

virtual void* GA_AIFBlindData::getWriteData ( GA_Attribute attrib,
GA_Offset  offset 
) const
pure virtual

Get a write pointer to the data for a given element.

template<typename T >
T& GA_AIFBlindData::getWriteValue ( GA_Attribute atr,
GA_Offset  off 
) const
inline

Convenience function to access value as a writable object.

Definition at line 90 of file GA_AIFBlindData.h.

virtual bool GA_AIFBlindData::setDataAlignment ( GA_Attribute attrib,
GA_Size  alignment_bytes 
) const
pure virtual

Set data alignment. This method will force data to be aligned on this many bytes. An alignment of 0 specifies the data will be aligned with sizeof(void*) on the particular architecture.

virtual bool GA_AIFBlindData::setDataSize ( GA_Attribute attrib,
GA_Size  size_in_bytes,
const void default_value = NULL 
) const
pure virtual

Set the data size. Each element will have this many bytes of data allocated for it.

virtual void GA_AIFBlindData::setSaveFlag ( GA_Attribute a,
bool  save 
) const
pure virtual

Get/Set the save flag. If the save flag is set, the blind data will be saved with geometry (if the attribute supports it)

template<typename T >
void GA_AIFBlindData::setValue ( GA_Attribute atr,
GA_Offset  off,
const T value 
) const
inline

Convenience function to set value to an object.

Definition at line 94 of file GA_AIFBlindData.h.

virtual void GA_AIFBlindData::swapEndianFlag ( GA_Attribute a) const
pure virtual

Query or set the endian flag.

Note
Calling swapEndian() will change the state of the endian flag, but will not swap the data (this is the caller's responsibility).

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