7 Interface Functions

7.1 DM_BindClass

This function binds the function pointer for a C++ generated class from a record with functions, to an IDM record object.

DM_Boolean DML_default DM_EXPORT DM_BindClass
(
  DM_ID      objID,
  DM_String  path,
  DM_RecordFunc classFunc,
  DM_Options options
)

Parameters

-> IDM_ID objID

Here, either the ID of the record which is to be bound or the parent (e.g. the module or the dialog), from whom it is possible to determine the record after entering in additional information concerning the path, must be given.

-> IDM_String path

If this parameter is not NULL or an empty string, the record to be connected is determined from the objID as the parent using the path completely specified here.

-> IDM_RecordFunc classFunc

Address of the generated static C++ link function to the Dialog Manager.

-> DM_Options options

This parameter has to be 0.

Return value

DM_TRUE

Link successfully carried out

DM_FALSE

Link could not be carried out

Remark

This function does not have to be called directly by the IDM user. Only the generated class method DM_Record::bind() should be used.

7.2 DM_ConnectClass

With this function the this pointer of a C++-class instance is transferred to an IDM record object that has functions. Through this the IDM-record knows which instance it belongs to. This function also allows the user to cancel the connection.

DM_Boolean DML_default DM_EXPORT DM_ConnectClass
(
  DM_ID      objID,
  DM_Pointer thisPointer,
  DM_Options options
)

Parameters

-> IDM_ID objID

Here the ID of the record that is to get the connection to the C++ instance must be given.

-> IDM_Pointer thisPointer

this pointer of the C++ instance or NULL in order to disconnect.

-> DM_Options options

This parameter must be 0.

Return value

DM_TRUE

Connection was successful

DM_FALSE

Connection could not be carried out

Remark

This function does not have to be directly called by the IDM user. The user can also directly invoke the generated class methods connect() and disconnect() for his or her C++ instance. These methods have been inherited from DM_Record.

See also

DM_Record::connect(), DM_Record::disconnect()