DATASERV (kappserv) functions


LIBRARY ROUTINE

kpds_copy_object_data - copy all data from one object to another object.

LIBRARY CALL

int kpds_copy_object_data(
   kobject source_object,
   kobject destination_object)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

This function copies all of the data associated with the source_object to the destination_object. This means that all of the data in the object will be copied, not just the data associated with the polymorphic data model (Value, Mask, Map, Location and Time data). For example, the source object may contain data that one of the other services (such as geometry services or color services.) use. These data will also be copied.

This routine will create all of the data in the destination_object that do not exist. It will initialize two attributes that are used to define the physical storage the of the data: KPDS_*_SIZE, and KPDS_*_DATA_TYPE. If the data already exists in the destination_object, then the data will be replaced with what is in the source_object. In this case, the data type and size will not be changed. As the data is copied from the source to the destination, it will be cast and resized to fit the destination. The attribute that is used to control how the resize occurs is KPDS_*_INTERPOLATE. This attribute can take on the values KNONE indicating that no resize should occur (if resize is necessary, then this function will fail); KPAD, indicating that the data should be padded with the KPDS_*_PAD_VALUE if the source object is larger than the source, or clipped if the destination is smaller than the source; or KZERO_ORDER, which indicates that a zero-order hold interpolation (pixel replication) should occur.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/include/kappserv/kpolymorphic.h

SEE ALSO

kappserv(3)

COPYRIGHT

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