Previous | Table of Contents | Next |
An ODL property has either a get/set pair or just a set method is mapped to an OMG IDL attribute. An ODL property with just
a get accessor is mapped to an OMG IDL readonly attribute.
Given the ODL interface definition
// ODL[odl, dual, uuid(...)]interface DIaccount: IDispatch {
[propput] HRESULT balance ([in] float balance, [propget] HRESULT balance ([retval,out] float * ret);[propget] HRESULT owner ([retval,out] BSTR * ret);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);}
the corresponding OMG IDL interface is:
// OMG IDLinterface account {attribute float balance;
readonly attribute string owner; long makeLodgement(in float amount, out float balance); long makeWithdrawal(in float amount,
out float balance);
};
ODL [in], [out], and [in,out] parameters map to OMG IDL in, out, and inout parameters, respectively. Section 19.3, “Mapping
for Basic Data Types,? on page 19-9 explains the mapping for basic types.