HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_AIFFileH9 Class Reference

Attribute Interface for file I/O. More...

#include <GA_AIFFileH9.h>

+ Inheritance diagram for GA_AIFFileH9:

Classes

class  LoadInfo
 Class used to cache information during the H9 save process. More...
 
class  SaveInfo
 Class used to cache information during the H9 save process. More...
 

Public Types

enum  AttribType {
  ATTRIB_FLOAT = 0, ATTRIB_INT = 1, ATTRIB_STRING = 2, ATTRIB_MIXED = 3,
  ATTRIB_INDEX = 4, ATTRIB_VECTOR = 5
}
 Data types stored in Houdini 9 data files. More...
 
enum  AttribTypeInfo { ATTRIB_INFO_NONE = 0, ATTRIB_INFO_INDEX_PAIR = 1, ATTRIB_NUM_INFO }
 Attribute type modifiers stored in Houdini 9 data files. More...
 
typedef GA_AIFDefinition
< GA_AIFFileH9
Definition
 

Public Member Functions

 GA_AIFFileH9 ()
 
 ~GA_AIFFileH9 () override
 
virtual SaveInfo getSaveInfo (const GA_Attribute *attrib, int component=0) const
 Create save information for a given GA attribute. More...
 
virtual bool saveDefaults (const GA_Attribute *attrib, const SaveInfo &info, std::ostream &os, bool binary) const
 
virtual bool saveStrings (const GA_Attribute *attrib, std::ostream &os, bool binary, UT_IntArray &stringmap) const
 
virtual bool saveData (const GA_Attribute *attrib, const SaveInfo &info, GA_Offset offset, std::ostream &os, bool binary) const
 Save the element data for a given attribute. More...
 
virtual LoadInfo getLoadInfo (const GA_Attribute *attrib, AttribType type, AttribTypeInfo type_info, int tuple_size) const
 Create load information for an H9 attribute. More...
 
virtual bool loadData (GA_Attribute *attrib, UT_IStream &is, const LoadInfo &info, GA_Offset offset) const
 Load the attribute data for a given element. More...
 
virtual bool finishLoad (GA_Attribute *attrib, const LoadInfo &info) const
 
- Public Member Functions inherited from GA_AIFBase
virtual ~GA_AIFBase ()
 

Static Public Member Functions

static bool skipData (UT_IStream &is, const LoadInfo &info)
 Skip data unsupported data in the input stream. More...
 
static Definition getDefinition ()
 

Protected Member Functions

bool saveDefaultsImpl (const GA_Defaults *defs, const SaveInfo &info, std::ostream &os, bool binary, char lead_ch= ' ') const
 

Detailed Description

Attribute Interface for file I/O.

This class provides an interface used to save and load attributes to and from files.

In H9, the attributes stored their data interleaved for each element. GA prefers to process data in arrays rather than interleaved. This class contains SaveInfo and LoadInfo which help with the interleaving/de-interleaving process.

Definition at line 44 of file GA_AIFFileH9.h.

Member Typedef Documentation

Member Enumeration Documentation

Data types stored in Houdini 9 data files.

Enumerator
ATTRIB_FLOAT 
ATTRIB_INT 
ATTRIB_STRING 
ATTRIB_MIXED 
ATTRIB_INDEX 
ATTRIB_VECTOR 

Definition at line 53 of file GA_AIFFileH9.h.

Attribute type modifiers stored in Houdini 9 data files.

Enumerator
ATTRIB_INFO_NONE 
ATTRIB_INFO_INDEX_PAIR 
ATTRIB_NUM_INFO 

Definition at line 66 of file GA_AIFFileH9.h.

Constructor & Destructor Documentation

GA_AIFFileH9::GA_AIFFileH9 ( )
inline

Definition at line 49 of file GA_AIFFileH9.h.

GA_AIFFileH9::~GA_AIFFileH9 ( )
inlineoverride

Definition at line 50 of file GA_AIFFileH9.h.

Member Function Documentation

virtual bool GA_AIFFileH9::finishLoad ( GA_Attribute attrib,
const LoadInfo info 
) const
virtual

Call once finished loading the attribute data for all the elements to perform any clean up or finalization that may be needed.

static Definition GA_AIFFileH9::getDefinition ( )
static

Query the definition for this custom AIF. The first call will register this AIF in a thread-safe manner.

virtual LoadInfo GA_AIFFileH9::getLoadInfo ( const GA_Attribute attrib,
AttribType  type,
AttribTypeInfo  type_info,
int  tuple_size 
) const
virtual

Create load information for an H9 attribute.

virtual SaveInfo GA_AIFFileH9::getSaveInfo ( const GA_Attribute attrib,
int  component = 0 
) const
virtual

Create save information for a given GA attribute.

virtual bool GA_AIFFileH9::loadData ( GA_Attribute attrib,
UT_IStream is,
const LoadInfo info,
GA_Offset  offset 
) const
virtual

Load the attribute data for a given element.

virtual bool GA_AIFFileH9::saveData ( const GA_Attribute attrib,
const SaveInfo info,
GA_Offset  offset,
std::ostream &  os,
bool  binary 
) const
virtual

Save the element data for a given attribute.

virtual bool GA_AIFFileH9::saveDefaults ( const GA_Attribute attrib,
const SaveInfo info,
std::ostream &  os,
bool  binary 
) const
virtual

Save the attribute defaults to the output stream.

Parameters
attribThe attribute to save
infoSaveInfo class helper
osThe output stream
binarySave as ASCII (false) or binary (true)
bool GA_AIFFileH9::saveDefaultsImpl ( const GA_Defaults defs,
const SaveInfo info,
std::ostream &  os,
bool  binary,
char  lead_ch = ' ' 
) const
protected
virtual bool GA_AIFFileH9::saveStrings ( const GA_Attribute attrib,
std::ostream &  os,
bool  binary,
UT_IntArray stringmap 
) const
virtual

Save the string table to the output stream. This method should only be called when getSaveInfo(attrib).getType() == ATTRIB_INDEX.

Parameters
attribThe attribute
osThe output stream
binarySave as ASCII (false) or binary (true)
stringmapA mapping of string handles to their in-order indices.
static bool GA_AIFFileH9::skipData ( UT_IStream is,
const LoadInfo info 
)
static

Skip data unsupported data in the input stream.


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