Previous Table of Contents Next


19.9.4 Mapping for Interfaces


   The mapping for an ODL interface to a CORBA View interface is straightforward. Each interface maps to an OMG IDL interface. In general, we map all methods and properties with the exception of the IUnknown and IDispatch methods.

   For example, given the ODL interface IMyModule_account,

   [odl, dual, uuid(...)]interface DIMyModule_account: IDispatch{

   [propget] HRESULT balance([retval,out] float * ret);};

   the following is the OMG IDL equivalent:

   // OMG IDLinterface MyModule_account {

   readonly attribute float balance;};

   If the ODL interface does not have a parameter with the [retval,out] attributes, its return type is mapped to long. This allows COM SCODE values to be passed through to the CORBA client.