Issue 3703: mapping of IDL factories (initializers) for valuetypes (ada-rtf) Source: (, ) Nature: Revision Severity: Minor Summary: Description: section 4.5.5 of the ada mapping specifies that IDL initializers have to be mapped into Ada functions. It reads "Thus they will be primitive on the value reference type". For example, // IDL valuetype VT { factory create(in long l); } is mapped into // ada package VT is type Value_Ref is ... function VT (l : in CORBA.Long) return Value_Ref; end VT; The fact that these functions be primitives implies that they have to be overriden for each inheriting valuetype. This implies code rewriting, with unprecise semantics: what should the semantic of the overriding function be ? Therefore, we suggest that the return type of the function be a Value_Ref'Class, so that these functions are not primitives, and do not have to be overriden. Resolution: Accept as suggested Revised Text: Change the first two sentences of Section 4.5.5 to read: An initializer definition shall be mapped to an Ada function that returns an instance of the class of the mapped value reference type. (Thus they will NOT be primitive on the value reference type.) In the example in section 1.10.2.1, change the following Ada code line: function createWBT(w : in CORBA.Long) return Value_Ref; to: function createWBT(w : in CORBA.Long) return Value_Ref’class; Make the same change in the package Exampleb.WeightedBinaryTree in section 1.10.2.5. Make the same change in section 4.5.9. Disposition: Resolved Actions taken: June 13, 2000: received issue January 12, 2010: closed issue Discussion: End of Annotations:===== Date: Tue, 13 Jun 2000 11:28:45 -0400 (EDT) Message-Id: <200006131528.LAA21195@emerald.omg.org> From: fabien.azavant@adabroker.eu.org To: juergen@omg.org, web-incoming@omg.org Subject: Issue Report Content-Type: text X-UIDL: K_Le9+EJe9Vbl!!J7-!! Name: Fabien Azavant Company: enst mailFrom: fabien.azavant@adabroker.eu.org Notification: Yes Specification: ada language mapping Section: 4.5.9 Formal #: Version: 1.2 Revision_Date: 05/04/2000 Page: Nature: Revision Severity: Minor full_desc: Specification: Ada Language Mapping Specification v1.2 (May 2000) Nature: Revision Severity: Minor Summary: mapping of IDL factories (initializers) for valuetypes Description: section 4.5.5 of the ada mapping specifies that IDL initializers have to be mapped into Ada functions. It reads "Thus they will be primitive on the value reference type". For example, // IDL valuetype VT { factory create(in long l); } is mapped into // ada package VT is type Value_Ref is ... function VT (l : in CORBA.Long) return Value_Ref; end VT; The fact that these functions be primitives implies that they have to be overriden for each inheriting valuetype. This implies code rewriting, with unprecise semantics: what should the semantic of the overriding function be ? Therefore, we suggest that the return type of the function be a Value_Ref'Class, so that these functions are not primitives, and do not have to be overriden. From: Victor Giddings To: ada-rtf@omg.org Subject: Proposed Resolution for 3703 Date: Sat, 25 Oct 2008 10:52:59 -0400 Cc: Nick Roberts X-Mailer: Apple Mail (2.929.2) Disposition: Resolved OMG Issue No: 3703 Title: Mapping of IDL Factories (Initializers) for valuetypes Source: École Nationale Supérieure des Télécommunications Fabien Azavant fabien.azavant@adabroker.eu.org Summary: Mapping of IDL factories (initializers) for valuetypes Description: Section 4.5.5 of the ada mapping specifies that IDL initializers have to be mapped into Ada functions. It reads "Thus they will be primitive on the value reference type". For example: // IDL valuetype VT { factory create(in long l); } is mapped into // Ada package VT is type Value_Ref is ... function VT (l : in CORBA.Long) return Value_Ref; end VT; The fact that these functions be primitives implies that they have to be overriden for each inheriting valuetype. This implies code rewriting, with unprecise semantics: what should the semantic of the overriding function be ? Therefore, we suggest that the return type of the function be a Value_Ref'Class, so that these functions are not primitives, and do not have to be overriden. Resolution: Accept as suggested. Revised Text: Change the first two sentences of Section 4.5.5 to read: An initializer definition shall be mapped to an Ada function that returns an instance of the class of the mapped value reference type. (Thus they will NOT be primitive on the value reference type.) In the example in section 1.10.2.1, change the following Ada code line: function createWBT(w : in CORBA.Long) return Value_Ref; to: function createWBT(w : in CORBA.Long) return Value_Ref.class; Make the same change in the package Exampleb.WeightedBinaryTree in section .10.2.5. Make the same change in section 4.5.9. Disposition: Resolved Victor Giddings victor_giddings@omg.org submit: Submit Issue Report