DATASERV (kappserv) functions


LIBRARY ROUTINE

kpds_query_attribute - get information about an attribute

LIBRARY CALL

int
kpds_query_attribute(
   kobject object,
   char   *attribute,
   int    *num_args,
   int    *arg_size,
   int    *data_type,
   int    *permanent)

INPUT

OUTPUT

none

RETURN VALUE

TRUE if attribute exists, FALSE otherwise

DESCRIPTION

This function is used for two purposes: (1) to determine the existence of an attribute; and (2) to obtain the characteristics of the attribute.

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.

The difference between shared and unshared attributes is abstracted from the user at the PDS level. The permanent attributes are generally shared, and the non-permanent attributes are generally non-shared. Permanent attributes are attributes that will be stored as part of an output object when it is written. Any attributes that are retrieved when an object is opened are also permanent attributes. Non-permanent attributes exist only while the program that is operating on the object is executing.

The datatype argument indicates what kind of information is stored in the attribute. Attributes can be one of the following data types: KBYTE, KUBYTE, KSHORT, KUSHORT, KINT, KUINT, KLONG, KULONG, KFLOAT, KDOUBLE, KCOMPLEX, or KDCOMPLEX.

The num_args argument indicates how many arguments must be passed in an argument list to one of the attribute functions.

The size arguments indicates the number of units of the data type there are in each argument. This argument allows arrays of information to be stored as attributes.

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.