Previous Table of Contents Next


19.2.2 Mapping for OMG IDL Single Inheritance


   A hierarchy of singly-inherited OMG IDL interfaces maps to an identical hierarchy of Automation View Interfaces.

   For example, given the interface account and its derived interface checkingAccount defined as follows,

   module MyModule { // OMG IDL

   interface account { attribute float balance; readonly attributestring owner; void makeLodgement (in float amount, out float

   balance);

   void makeWithdrawal (in float amount, out float

   theBalance); }; interface checkingAccount: account {

   readonly attribute float overdraftLimit; boolean orderChequeBook (); }; };

   the corresponding Automation View Interfaces are as follows

   // ODL[odl, dual, uuid(20c31e22-dcb2-aa79-1dc4-34a4ad297579)]interface DIMyModule_account: IDispatch {

   HRESULT makeLodgement( [in] float amount,[out] float * balance, [optional, out] VARIANT * excep_OBJ);HRESULT makeWithdrawal( [in] float amount,[out] float * balance,

   [optional, out] VARIANT * excep_OBJ);[propget] HRESULT balance( [retval,out] float * val);[propput] HRESULT balance( [in] float balance);[propget] HRESULT owner( [retval,out] BSTR * val);

   };

   [odl, dual, uuid(ffe752b2-a73f-2a28-1de4-21754778ab4b)]interface DIMyModule_checkingAccount: IMyModule_account {

   HRESULT orderChequeBook([optional, out] VARIANT * excep_OBJ, [retval,out] short * val);[propget] HRESULT overdraftLimit ([retval,out] short * val);

   };