DATASERV (kappserv) functions


LIBRARY ROUTINE

kpds_match_attribute - returns TRUE if the same attribute in two objects match.

LIBRARY CALL

int
kpds_match_attribute(
   kobject object1, 
   kobject object2, 
   char *attr)

INPUT

OUTPUT

none

RETURN VALUE

There are three ways for this routine to return a FALSE: (1) if the attribute in the two objects does not match; (2) if either object does not contain the specified attribute; (3) an error condition resulting from an invalid object or segment. If none of these three conditions exist, then this function will return TRUE.

DESCRIPTION

The purpose of this routine is to allow the programmer to compare a single in two data objects.

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 routine will return TRUE if the specified attribute has the same value in both of the objects. This routine will return FALSE if the attribute does not have the same value in both of of the objects. kpds_match_attribute will also return FALSE if the attribute does not exist in either or both of the objects.

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.