astSet

Set attribute values for an Object

Description:

This function assigns a set of attribute values to an Object, over-riding any previous values. The attributes and their new values are specified via a character string, which should contain a comma-separated list of the form:

" attribute_1 = value_1, attribute_2 = value_2, ... "

where " attribute_n" specifies an attribute name, and the value to the right of each " =" sign should be a suitable textual representation of the value to be assigned. This value will be interpreted according to the attribute s data type.

The string supplied may also contain " printf" -style format specifiers, identified by " %" signs in the usual way. If present, these will be substituted by values supplied as additional optional arguments (using the normal " printf" rules) before the string is used.

Synopsis

void astSet( AstObject this, const char settings, ... )

Parameters:

this
Pointer to the Object.
settings
Pointer to a null-terminated character string containing a comma-separated list of attribute settings in the form described above.
...
Optional additional arguments which supply values to be substituted for any " printf" -style format specifiers that appear in the " settings" string.

Applicability

Object
This function applies to all Objects.

Examples:

astSet( map, " Report = 1, Zoom = 25.0" );
Sets the Report attribute for Object " map" to the value 1 and the Zoom attribute to 25.0.
astSet( frame, " Label( %d ) =Offset along axis %d" , axis, axis );
Sets the Label(axis) attribute for Object " frame" to a suitable string, where the axis number is obtained from " axis" , a variable of type int.
astSet( frame, " Title =%s" , mystring );
Sets the Title attribute for Object " frame" to the contents of the string " mystring" .

Notes: