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

#include <SIM_Query.h>

+ Inheritance diagram for SIM_Query:

Public Member Functions

 SIM_Query ()
 Simple constructor. More...
 
 SIM_Query (const SIM_Data *owner)
 Constructor which takes a const SIM_Data as our owner. More...
 
virtual ~SIM_Query ()
 Destructor for this class. More...
 
bool deleteIfDataModified () const
 
int getNumRecordTypes () const
 
const char * getRecordTypeName (int recordtypenum) const
 
int getNumRecords (const char *recordtype) const
 
int getNumFields (const char *recordtype) const
 
const char * getFieldName (const char *recordtype, int fieldnum) const
 
UT_OptionType getFieldType (const char *recordtype, int fieldnum) const
 
UT_OptionType getFieldTypeByName (const char *recordtype, const char *fieldname) const
 
bool getFieldRaw (const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) const
 
bool getFieldString (const char *recordtype, int recordnum, const char *fieldname, UT_String &result) const
 
bool getFieldString (const char *recordtype, int recordnum, const char *fieldname, UT_StringHolder &result) const
 
bool getFieldFloat (const char *recordtype, int recordnum, const char *fieldname, fpreal &result) const
 
void getAllFieldFloatNames (const char *recordtype, UT_StringArray &names, UT_Array< UT_OptionType > &fieldtypes, UT_IntArray &vectorindices) const
 
void getInfoTree (UT_InfoTree &infotree, const char *recordtype) const
 Fills a UT_InfoTree structure with all our data. More...
 

Protected Member Functions

const SIM_DatagetOwner () const
 
virtual bool deleteIfDataModifiedSubclass () const
 
virtual int getNumRecordTypesSubclass () const
 
virtual const char * getRecordTypeNameSubclass (int recordtypenum) const
 
virtual int getNumRecordsSubclass (const char *recordtype) const
 
virtual int getNumFieldsSubclass (const char *recordtype) const
 
virtual const char * getFieldNameSubclass (const char *recordtype, int fieldnum) const
 
virtual UT_OptionType getFieldTypeSubclass (const char *recordtype, int fieldnum) const
 
virtual bool getFieldRawSubclass (const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) const
 

Friends

class SIM_QueryCombine
 Give SIM_QueryCombine special access to our protected methods. More...
 

Detailed Description

This class provides an interface between a SIM_Data and the Houdini expression language. It also helps in building the tree view of a simulation.

Definition at line 24 of file SIM_Query.h.

Constructor & Destructor Documentation

SIM_Query::SIM_Query ( )
explicit

Simple constructor.

SIM_Query::SIM_Query ( const SIM_Data owner)
explicit

Constructor which takes a const SIM_Data as our owner.

virtual SIM_Query::~SIM_Query ( )
virtual

Destructor for this class.

Member Function Documentation

bool SIM_Query::deleteIfDataModified ( ) const

This function returns true if this object needs to be deleted when the owner data changes. This may be the case if this class caches some information about the SIM_Data owner. This default implementation returns false.

virtual bool SIM_Query::deleteIfDataModifiedSubclass ( ) const
protectedvirtual

Reimplemented in SIM_QueryCombine.

void SIM_Query::getAllFieldFloatNames ( const char *  recordtype,
UT_StringArray names,
UT_Array< UT_OptionType > &  fieldtypes,
UT_IntArray vectorindices 
) const

Fills the provided array with the names of all valid values that can be passed to the getFieldFloat function. This includes all versions of the field names with appropriate suffices.

bool SIM_Query::getFieldFloat ( const char *  recordtype,
int  recordnum,
const char *  fieldname,
fpreal result 
) const
const char* SIM_Query::getFieldName ( const char *  recordtype,
int  fieldnum 
) const
virtual const char* SIM_Query::getFieldNameSubclass ( const char *  recordtype,
int  fieldnum 
) const
protectedvirtual
bool SIM_Query::getFieldRaw ( const char *  recordtype,
int  recordnum,
const char *  fieldname,
UT_OptionEntryPtr result 
) const

Sets the result pointer to a UT_OptionEntry subclass that depends on the data type of the field. It may be any of the UT_OptionEntryImpl classes. It is up to the caller to free this result pointer.

virtual bool SIM_Query::getFieldRawSubclass ( const char *  recordtype,
int  recordnum,
const char *  fieldname,
UT_OptionEntryPtr result 
) const
protectedvirtual
bool SIM_Query::getFieldString ( const char *  recordtype,
int  recordnum,
const char *  fieldname,
UT_String result 
) const

These functions use getFieldRawand process the result to generate a nice string or single float value as required by the expression library.

bool SIM_Query::getFieldString ( const char *  recordtype,
int  recordnum,
const char *  fieldname,
UT_StringHolder result 
) const
UT_OptionType SIM_Query::getFieldType ( const char *  recordtype,
int  fieldnum 
) const
UT_OptionType SIM_Query::getFieldTypeByName ( const char *  recordtype,
const char *  fieldname 
) const
virtual UT_OptionType SIM_Query::getFieldTypeSubclass ( const char *  recordtype,
int  fieldnum 
) const
protectedvirtual
void SIM_Query::getInfoTree ( UT_InfoTree infotree,
const char *  recordtype 
) const

Fills a UT_InfoTree structure with all our data.

int SIM_Query::getNumFields ( const char *  recordtype) const
int SIM_Query::getNumRecords ( const char *  recordtype) const
int SIM_Query::getNumRecordTypes ( ) const
const SIM_Data* SIM_Query::getOwner ( ) const
protected
const char* SIM_Query::getRecordTypeName ( int  recordtypenum) const
virtual const char* SIM_Query::getRecordTypeNameSubclass ( int  recordtypenum) const
protectedvirtual

Friends And Related Function Documentation

friend class SIM_QueryCombine
friend

Give SIM_QueryCombine special access to our protected methods.

Definition at line 127 of file SIM_Query.h.


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