6.1 Class DM_Interface

This class provides a few non-object based functions which you are already familiar with from the C interface.

Apart from this there is an exception class defined for the treatment of exceptions.

class DM_Exception {} ;

This exception is used by practically all functions in order to forward an error case.

Such an exceptional treatment can be encoded as in the following code fragment at the hand of the query on the .content attribute of a listbox.

DM_String str;
DM_Value  idx;
DM_Object obj;
...
try {
  obj.id(listboxId);
  idx.type = DT_integer;
  idx.value.integer = 1234;
  str = obj.getString(AT_content, &idx);
}
catch (DM_Exception e) {
  DM_TraceMessage("Exception occured – getvalue failed", 0);
}
...
  class DM_Exception {} ;

6.1.1 getValues()

This function provides the function DM_GetMultiValue from the C interface as a static method and serves to query several attribute values at the same time, even of different objects.

void getValues
(
  DM_MultiValue *values,
  DM_UInt        count,
  DM_Options     options = 0
)

Parameters

-> DM_MultiValue *values

List of attributes and objects whose values are to be queried.

-> DM_UInt count

Length of the field which was given in parameter values.

-> DM_Options options

Not used, must be 0.

Return value

None.

Exceptions

DM_Exception

Function could not be executed without error.

See also

Function DM_GetMultiValue

6.1.2 setValues()

This function provides the function DM_SetMultiValue from the C interface as a static method and serves to set several attribute values at the same time, even of different objects.

void setValues
(
  DM_MultiValue *values,
  DM_UInt        count,
  DM_Options     options = 0
)

Parameters

-> DM_MultiValue *values

List of attributes, values and objects which are to be set.

-> DM_UInt count

Length of the field which was given in parameter values.

-> DM_Options options

Not used, must be 0.

Return value

None.

Exceptions

DM_Exception

Function could not be executed without error.

See also

Function DM_SetMultiValue

6.1.3 resetValues()

This function provides the function DM_ResetMultiValue from the C interface as a static method and serves to reset several attribute values at the same time, even of different objects.

void resetValues
(
  DM_MultiValue *values,
  DM_UInt        count,
  DM_Options     options = 0
)

Parameters

-> DM_MultiValue *values

List of attributes and objects whose value is to be reset.

-> DM_UInt count

Length of the field which was given in parameter values.

-> DM_Options options

Not used, must be 0.

Return value

None.

Exceptions

DM_Exception

Function could not be executed without error.

See also

Function DM_ResetMultiValue

6.1.4 freeValues()

This function provides the function DM_FreeVectorValue from the C interface as a static method and serves to free storage capacity allocated by calls of DM_GetVectorValue() or DM_Object::getVector().

void freeValues
(
  DM_VectorValue *vector,
  DM_Options      options = 0
)

Parameters

-> DM_VectorValue *vector

The vector allocated by the IDM.

-> DM_Options options

Not used, must be 0.

Return value

None.

Exceptions

DM_Exception

Function could not be executed without error.

See also

Function DM_FreeVectorValue