TOC PREV NEXT INDEX

GDget_int_val

Synopsis

get or set an integer value

int _ GDget_int_val ( parent_id , _ elem_name , _float * val );
int _ GDget_newint_val ( parent_id , _ elem_name , _ seq , _float * val );
int _ GDget_updint_val ( parent_id , _ elem_name , _ seq , _float * val );
void _ GDset_int_val ( parent_id , _ elem_name , _float val );
void _ GDset_newint_val ( parent_id , _ elem_name , _ seq , _float val );

OMobj_id _ parent_id ;
char _* elem_name ;
int _* seq ;

Description

GDget_int_val gets an integer value and places the value into val . The return value is 1 if successful, 0 if a failure.

GDget_newint_val gets an integer value and places the value into val . The routine also returns the value's updated sequence number. The return value is 1 if the data has changed, 0 if it has not.

GDget_updint_val gets an integer value and places the value into val . The return value is 1 if the data has changed, 0 if it has not.

GDset_int_val sets an integer value.

GDset_newint_val sets an integer value. The routine also returns the value's updated sequence number.

Parameters

parent_id

The id of the target subobject's parent.

elem_name

The name of the target subobject.

seq

(GDget_newint_val only) _An input/output argument. It is used to compare against the value's current sequence number to determine if the value has changed. It is then updated with the current sequence number.
(GDget_updint_val only) _An input argument. It is used to compare against the value's current sequence number to determine if the value has changed.

(GDset_newint_val only) _An output argument that is updated with the current sequence number.

val

In the GDget_xxxx routines, the address where the routine places the value.
In the GDset_xxxx routines, the value that the routine copies.

Example

/* Get, then set, the value of a camera's depth_cue subobject*/
OMobj_id _camera_id; /* Assume this has been set. */
int depth_cue;
int status;
...
status = GDget_int_val(camera_id, "depth_cue", &depth_cue);
if (status == 0) {
printf("Error getting the camera's depth_cue subobject\n");
return(1);
};

/* Modify the value, then set the object. */
depth_cue = 0;
GDset_int_val(camera_id, "depth_cue", depth_cue);


TOC PREV NEXT INDEX