GDIndex.gif Previous-2.gif Next-3.gif

GDget_str_val - GD API


Synopsis

get or set a string value

int   GDget_str_val ( parent_id ,   elem_name ,  char ** string );
int   GDget_newstr_val ( parent_id ,   elem_name ,   seq ,  char ** string );
int   GDget_updstr_val ( parent_id ,   elem_name ,   seq ,  char ** string );
void   GDset_newstr_val ( parent_id ,   elem_name ,   seq ,  char * string );

OMobj_id   parent_id ;
char  * elem_name ;
int  * seq ;

Description

GDget_str_val gets a string value and places the value into string . The return value is 1 if successful, 0 if a failure.

GDget_newstr_val gets a string value and places the value into string . The routine also returns the string's updated sequence number. The return value is 1 if the data has changed, 0 if it has not.

GDget_updstr_val gets a string value and places the value into string . The return value is 1 if the data has changed, 0 if it has not.

GDset_newstr_val sets a string value. The routine also returns the string'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_newstr_val only)  An input/output argument. It is used to compare against the string's current sequence number to determine if the string has changed. It is then updated with the current sequence number.

(GDget_updstr_val only)  An input argument. It is used to compare against the string's current sequence number to determine if the string has changed.

(GDset_newstr_val only)  An output argument that is updated with the current sequence number.

string

In the GDget_xxxx routines, the address where the routine places the string.

In the GDset_xxxx routines, the string that the routine copies.

Example


/* Get the name of the current object, stored in GDobj_sel. */
OMobj_id  obj_sel_id; /* Assume this has been set. */
char curobj_name[40];
int seq;
...
GDget_newstr_val(GDobj_sel, "curobj_name", &seq,
&curobj_name);

 



GDIndex.gif Previous-2.gif Next-3.gif