FLDget_node_data_type


Synopsis

get the primitive data type of the data within a Node_Data Data_Array


int FLDget_node_data_type (
OMobj_id field,
int comp,
int *type);

int FLDset_node_data_type (
OMobj_id field,
int comp,
int type);

Description

These routines get and set the primitive data type of the data held by a Data_Array. You use them to set or discover what kind of data (int, double, float, etc.) you are dealing with. This data type will be valid for the values array, the null value (if present), and the min/max and min_vec/max_vec.

Parameters

OMobj_id field

The OMobj_id of a field that contains a Node_Data Data_Array subobject.

int comp

comp is an integer that specifies which component [0-n] of the Node_Data you want to query. Each component can be of a different type.

int type
int *type

A pointer to an integer or an integer, respectively, that specifies the primitive data type. The choices are (defined in avs/dtype.h):

DTYPE_CHAR
DTYPE_BYTE
DTYPE_SHORT
DTYPE_INT
DTYPE_FLOAT
DTYPE_DOUBLE

FLDget_node_data_type returns the actual type in *type, and FLDset_node_data_type sets the data type to type.

Example

This example, some fragments from modules/crop.c, shows crop retrieving the data type from the input field object, then using FLDget_node_data to set the type (along with pointers to other subobjects) of the output field that will be filled in later.