FLDget_cell_data
Synopsis
get/set the values array within one component of a Cell_Data cell_set Data_Array
int FLDset_cell_data (
OMobj_id cell_set,
int comp,
char *cell_data,
int type,
xp_long size,
int mode);
int FLDget_cell_data (
OMobj_id cell_set,
int comp,
int *type,
char **cell_data,
xp_long *size,
int mode);
int FLDget_cell_data_n (
OMobj_id cell_set,
int comp,
int *type,
char **cell_data,
int *size,
int mode);
Description
These routines get and set the values[nvals][veclen] array within one component of the Data_Array of one cell_set in a Cell_Data.
The FLDget_node_data routine can be used for both getting and setting the values array. When setting with a "get" routine (mode = OM_GET_ARRAY_WR or OM_GET_ARRAY_RW), the routine returns a pointer to a pre-allocated array, and the developer just needs to fill in the values.
Parameters
An integer that sets which component's [0-n] (ncell_data) Data_Array of the given cell_set to access.
The above is true except for the case where the array was first created with an FLDget_cell_data routine (mode = OM_GET_ARRAY_WR). In this case type has to be specified by the caller.
void *cell_data
void **cell_dataIn FLDset_cell_data, cell_data is a pointer to the cell data array you want to set in the Object Manager. See mode below.
In FLDget_cell_data, cell_data is the address of a pointer to the cell data. Upon return, that pointer will be filled in with the address of the cell data array. You must call ARRfree() on that pointer when you are done using it. See mode below.
xp_long *size
xp_long size
int *size
int sizeIn FLDget_cell_data, size is a pointer to an integer in which the total number of array values (nvals * veclen) in the cell_data values is returned.
In FLDset_cell_data, size is an integer that sets the total number of array values (nvals * veclen) to create. A [100][3] array would have size=300.
An integer constant that establishes the access mode for the array subobject. Constants for the possible values are defined in avs/om.h as follows.
For FLDset_cell_data:
The program intends to write to the array, completely replacing it, but not read it.
The program requires a copy of the array for its own, private use (reading or writing).
Examples
modules/cellnode.c
modules/ext_face.c
modules/rd_ucd.c
modules/write.cFiles
See Also