Issue 2459: Mapping of operation parameters of same interface type. (ada-rtf) Source: (, ) Nature: Revision Severity: Summary: Summary: It is a natural consequence of the Ada language rules that an operation parameter of the same interface type, other than the implied parameter, must be mapped to a class-wide reference type. The Ada language rules disallow two controlling parameters, and the first added Ref parameter must be the controlling parameter. So, for an operation that has an implicit parameter of the enclosing interface, a special mapping rule is needed so that the operation is not primitive on that parameter. Resolution: Revised Text: Actions taken: February 19, 1999: received issue June 4, 1999: closed issue Discussion: End of Annotations:===== X-Sender: giddiv@gamma (Unverified) Date: Fri, 19 Feb 1999 11:28:04 -0500 To: issues@omg.org From: Victor Giddings Subject: Mapping of operation parameters of same interface type. Cc: ada-rtf@omg.org This is an issues against the Ada language mapping: Issue: It is a natural consequence of the Ada language rules that an operation parameter of the same interface type, other than the implied parameter, must be mapped to a class-wide reference type. The Ada language rules disallow two controlling parameters, and the first added Ref parameter must be the controlling parameter. So, for an operation that has an implicit parameter of the enclosing interface, a special mapping rule is needed so that the operation is not primitive on that parameter. Proposed Resolution: In the operation mapping rules, clarify that an implicit parameter or operation result of the same interface type as the enclosing interface type must be mapped as a class-wide Ref (Ref'CLASS). For example: interface Account { void absorb(in Account to_be_defunct); }; should map to: package Account is type Ref is new CORBA.Object.Ref with null record; procedure absorb(Self : Ref; to_be_defunct : in Ref'CLASS); end Account; Victor Giddings Chair, Ada RTF victor_giddings@omg.org From: "Oliver M. Kellogg" To: Subject: Re: Issue 2459: Mapping of operation parameters of same interface type. (ada-rtf) Date: Wed, 10 Mar 1999 14:03:55 +0100 X-Msmail-Priority: Normal I'd like to second this proposal. Beware that the mapping of attributes is also affected: interface Account { readonly attribute Account defunct; }; should map to package Account is type Ref is new CORBA.Object.Ref with null record; procedure Get_defunct (Self : Ref; Returns : out Ref'CLASS); end Account; Oliver Kellogg oliver.kellogg@vs.dasa.de X-Sender: giddiv@gamma Date: Wed, 10 Mar 1999 10:35:17 -0500 To: "Oliver M. Kellogg" , From: Victor Giddings Subject: Re: Issue 2459: Mapping of operation parameters of same interface type. (ada-rtf) Good point. I'll put this in an errata. At 02:03 PM 3/10/99 +0100, Oliver M. Kellogg wrote: >I'd like to second this proposal. > >Beware that the mapping of attributes is also affected: > >interface Account { > readonly attribute Account defunct; >}; > >should map to > >package Account is > type Ref is new CORBA.Object.Ref with null record; > procedure Get_defunct (Self : Ref; Returns : out Ref'CLASS); >end Account; > > >Oliver Kellogg >oliver.kellogg@vs.dasa.de > Victor Giddings Phone: 703-295-6500 Senior Product Engineer Fax: 703-295-6501 Objective Interface Systems victor.giddings@ois.com