HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CVEX_DataRetriever< PREC > Class Template Reference

#include <CVEX_Data.h>

Public Member Functions

 CVEX_DataRetriever (const CVEX_Data &data)
 Creates a retriever object for obtaining data from the buffers. More...
 
virtual ~CVEX_DataRetriever ()
 
bool isVarying (const UT_StringRef &name) const
 
bool retrieveData (const CVEX_ValueT< PREC > &value)
 
bool retrieveData (const UT_StringRef &data_name)
 

Protected Member Functions

virtual
DECLARE_CVEX_DATA_TYPES bool 
takeData (const UT_Array< Int > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Float > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< String > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Dict > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Vec2 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Vec3 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Vec4 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Mat2 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Mat3 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_Array< Mat4 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Int > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Float > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< String > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Dict > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Vec2 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Vec3 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Vec4 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Mat2 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Mat3 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 
virtual bool takeData (const UT_PackedArrayOfArrays< Mat4 > &data, const UT_StringRef &data_name)
 Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals. More...
 

Detailed Description

template<VEX_Precision PREC>
class CVEX_DataRetriever< PREC >

A helper class for retrieving data from CVEX buffers to custom destination. It abstracts the buffer management by allowing to override virtual methods for the particular data types.

For example:

class MY_Printer : public CVEX_DataRetriever32
{
public:
MyPrinter( const CVEX_Data &data )
: CVEX_DataRetriever32( data ) {}
...
virtual bool takeData( const UT_Array<Float> &data,
const UT_StringRef &data_name ) override
{
for( exint i = 0; i < data.size(); i++ )
cout << "Entry " << i << ": " << data[i] << "\n";
}
};
... // ... bind data buffers and run CVEX...
MY_Printer retriever( data );
cout << "Computed data for 'bar_out' buffer:\n";
retriever.retrieveData( "bar_out" );

Definition at line 409 of file CVEX_Data.h.

Constructor & Destructor Documentation

template<VEX_Precision PREC>
CVEX_DataRetriever< PREC >::CVEX_DataRetriever ( const CVEX_Data data)

Creates a retriever object for obtaining data from the buffers.

template<VEX_Precision PREC>
virtual CVEX_DataRetriever< PREC >::~CVEX_DataRetriever ( )
virtual

Member Function Documentation

template<VEX_Precision PREC>
bool CVEX_DataRetriever< PREC >::isVarying ( const UT_StringRef name) const
inline

Utility method for checking if the value is varying (and the associated buffer size is large as specified in the constructor

Definition at line 427 of file CVEX_Data.h.

template<VEX_Precision PREC>
bool CVEX_DataRetriever< PREC >::retrieveData ( const CVEX_ValueT< PREC > &  value)

Looks for a data buffer given the CVEX value or a name, and calls the virtuals to retrieve the data from the bufer.

template<VEX_Precision PREC>
bool CVEX_DataRetriever< PREC >::retrieveData ( const UT_StringRef data_name)

Looks for a data buffer given the CVEX value or a name, and calls the virtuals to retrieve the data from the bufer.

template<VEX_Precision PREC>
virtual DECLARE_CVEX_DATA_TYPES bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Int > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Float > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< String > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Dict > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Vec2 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Vec3 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Vec4 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Mat2 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Mat3 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_Array< Mat4 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Int > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Float > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< String > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Dict > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Vec2 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Vec3 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Vec4 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Mat2 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Mat3 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.

template<VEX_Precision PREC>
virtual bool CVEX_DataRetriever< PREC >::takeData ( const UT_PackedArrayOfArrays< Mat4 > &  data,
const UT_StringRef data_name 
)
protectedvirtual

Precision-dependent data types (Int, Float, Vec2, ...) used in virtuals.

Virtuals intended to be overriden by the subclasses. Their purpose is to take the value given in the parameter and transfer it to the intended destination. The data represents a data buffer on which the CVEX program was run. The name is the name of the data buffer.


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