FLDadd_int_array, FLDset_array_int, FLDget_array_int
Synopsis
create/get/set an integer subobject to an object
int FLDadd_int_array (
OMobj_id field,
const char *name,
xp_long size);
int FLDset_array_int (
OMobj_id field,
const char *name,
xp_long size,
int *array,
int mode);
int FLDget_array_int (
OMobj_id field,
const char *name,
int **array,
xp_long *size,
int mode);Description
These routines add a new integer array subobject to an existing field data schema object, and then set/get its values. They could also be used when you want to construct and reference an entirely new data object and add int array subobjects to it, but you want to do this within the code of a function, rather than using V.
Note: If you are accessing an existing, defined subobject, use the specific routine for that subobject (for example, FLDget_coord_extent). Use FLDadd/set/ get_array_int only when you have created your own, unique, named subobject, or when no FLD routine exists for a pre-defined subobject.
FLDadd_int_array adds an integer array subobject to the object specified by OMobj_id field. The object is named in the Object Manager by the string name. size indicates the total number of array values. For example, a [100][2] array would have size 200. The new subobject is flagged as "not set."
FLDset_array_int sets the integer array object named name within field equal to the first size values found in a integer array pointed to by array.
FLDget_array_int returns the value of the integer subobject name within field in via the double pointer array.
Parameters
In FLDadd_int, an input argument specifying a character string that names the new integer subobject.
In FLDset_int and FLDget_int, an input character string argument that specifies which subobject of field to get/set.
In FLDadd_int_array, size is the total number of array values to create. A [100][3] array would have size=300.
In FLDset_array_int, size is how many sequential values to take from array and assign to the subobject.
In FLDget_array_int, size is a pointer to an integer in which the size of the subobject array will be returned.
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_array_int:
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).
In FLDset_array_int, array is an array of integers of size size. Those values will be assigned to the name subobject.
In FLDget_array_int, array should be the address of a pointer to integers; upon return, *array will be filled in with a pointer to the values. You must call ARRfree on the returned pointer (*array) when you are done with that array.
Examples
Files
See Also