3.30 DM_GetMultiValue

With this function you can query various attributes of different DM objects in one function call. These functions should thus be used with the distributed DM, since they reduce the network traffic considerably.

DM_Boolean DML_default DM_EXPORT DM_GetMultiValue
(
  DM_MultiValue * values,
  DM_UInt count,
  DM_ID dialogID,
  DM_String pathname,
  DM_Options options
)

Parameters

<-> DM_MultiValue *values

List of attributes and objects to be queried. If the element in the structure for the object is set to 0, the object described in the parameter path name is taken. The list has to have at least the length given in the parameter "count".

-> DM_UInt count

Specifies the length of the object-attribute vector given in the parameter "values".

-> DM_ID dialogID

This parameter describes the dialog to which the given objects belong. It has to be specified only if the object identifier the attributes of which are to be queried is not known and thus the name of the object is specified in the parameter "pathname".

-> DM_String pathname

Describes the object the attributes of which are to be queried. It is only allocated if the object's internal identifier is not known yet.

-> DM_Options options

Currently not used. Please specify with 0.

Return Value

TRUE

The attributes were queried successfully

FALSE

At least one attribute could not be queried

Example

The following C function is to query coordinates at different objects.

void DML_default DM_ENTRY Get __3((DM_ID, o1),

                  (DM_ID, o2),

                  (DM_ID, o3))

{

  DM_MultiValue val[3];

 

  /* Setting the relevant object ID */

  val[0].object = o1;

  val[1].object = o2;

  val[2].object = o3;

/* Setting the relevant index type */

  val[0].index.type = DT_void;

  val[1].index.type = DT_void;

  val[2].index.type = DT_void;

/* Setting the relevant attribute */

  val[0].attribute = AT_xleft;

  val[1].attribute = AT_width;

  val[2].attribute = AT_xright;

 

  DM_GetMultiValue(val, 3, dialogID, (char *)0, 0);

 

  if (val[0].data.type == DT_integer)

    printf("%d %d %d\n",

        (int) val[0].data.value.integer,

        (int) val[1].data.value.integer,

        (int) val[2].data.value.integer);

}

See Also

“Object Reference” for the attributes permitted for the relevant object type