DATASERV (kapputils) functions


LIBRARY ROUTINE

kapu_upgrade_objects - check objects for value, map, and mask data, and set up for polymorphic processing

LIBRARY CALL

int kapu_upgrade_objects(
   int	    *process_map,
   int	    *process_value,
   int	    *process_mask,
   int	    *map_type,
   int	    *value_type,
   int	    *mask_type,
   int	     upgrade_mapping,
   int	     upgrade_type,
   int	     upgrade_size,
   int	     use_subobj_pos,
   int	     num_src_objs,
   kvalist)

INPUT

OUTPUT

RETURN VALUE

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

DESCRIPTION

This function checks the source objects for map, value, and mask data, and it sets the processing flags and type parameters passed in to indicate how the objects would best be processed as polymorphic objects. If the upgrade flags are TRUE, this function will also set up the objects for the recommended processing.

Upgrade Parameters: The upgrade parameters are applied in this order - mapping first, then type, then size.

upgrade_mapping If the upgrade_mapping parameter is true, and the recommended processing is not process_map, then any object that has map data will be modified so that the KPDS_MAPPING_MODE is KMAPPED.

upgrade_type If the upgrade_type flag is TRUE, then all segments that exist in the data objects will be upgraded to the highest common data type for that segment. For example, if the value data in source 1 is unsigned byte, and the data type in source 2 is float, source 1's value data will be upgraded to float. If mapping has already been upgraded, the data type upgrade will be applied to the value data (since setting KPDS_MAPPING_MODE to KMAPPED maps the data through the value segment, removing the map).

upgrade_size If the upgrade_size flag is TRUE, then all segments that exist in the data objects will be upgraded to the highest size of each dimension, for each segment. Again, if mapping has already been upgraded, size upgrading will not be applied to map data.

Subobject Position Flag If the use_subobj_pos flag is TRUE, the subobject position for each source object that has value or mask data is recorded. The minimum subobject position that is common to all source objects is determined. This minimum position, along with the individual subobject positions, is used when calculating the destination object size. Size is calculated so that subobject positions are aligned.

If the upgrade_size flag is true, the object sizes, the value and mask segment offsets, and the subobject position attributes will be upgraded.

If invalid objects are passed in, this function will not fail, but will pass over those objects. Invalid objects will not be taken into consideration.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/kapputils/src/utilities.c

SEE ALSO

kapputils(3)

COPYRIGHT

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