DATASERV (kappserv) functions


LIBRARY ROUTINE

kpds_set_attributes - set the values of multiple attributes in a data object.

LIBRARY CALL

int
kpds_set_attributes(
   kobject object,
   kvalist)

INPUT

OUTPUT

none

RETURN VALUE

TRUE if the attribute was successfully retrieved, FALSE otherwise.

DESCRIPTION

This function is used to assign the values of an arbitrary number of attributes to a data object.

Data Services manages two versions of some of the attributes associated with each object. These attributes are the size and data type. Internally, the two versions of these attributes are referred to as the physical attribute and the presentation attribute. Typically, the programmer has access to only the presentation versions of these attributes. The physical attributes are set indirectly depending on the setting of KPDS_COUPLING. See kpds_get_data for a description of how the presentation and physical attributes affect interaction with the data object.

Other attributes are classified as either shared or unshared. Shared attributes are stored at the physical layer of the attribute, and thus can be shared by multiple references of the data object (see kpds_reference_object for more information about references). Unshared attributes, on the other hand, can only be used by the local object (see kpds_query_attribute for information on how to determine whether an attribute is shared or unshared).

This function accepts an object followed by a list of of arguments that alternate between an attribute name and values that the specified attribute is to be set to. The last argument on this list is a NULL which serves as a flag that indicates that no more attributes are present on the list. Certain KPDS attributes require more than one value in order to return the entire attribute. For example, KPDS_VALUE_SIZE requires five (5) arguments. For example,

kpds_set_attributes(object, KPDS_VALUE_DATA_TYPE, KFLOAT, KPDS_VALUE_SIZE, 100, 100, 1, 1, 1, NULL);

The last argument to this function must be NULL. If it is not NULL, then the behavior of this function will be unpredictable (the NULL argument is used as a sentinal to indicate the end of the variable argument list. If the sentinal is not present, then this function will continue to attempt to pull arguments off of the stack, until it finds a NULL).

A complete list of the polymorphic attributes can be found in Chapter 2 of Programming Services Volume II.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/kappserv/src/polymorph.c

SEE ALSO

kappserv(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.