ADA 1.3 RTF Avatar
  1. OMG Issue

ADA13 — Interface/valuetype forward declarations and Ada2005

  • Key: ADA13-21
  • Legacy Issue Number: 12752
  • Status: closed  
  • Source: Airbus Group ( Oliver Kellogg)
  • Summary:

    Ada2005 features a new language construct, the "limited with" clause,
    which brings direct support for forward declarations to the Ada language.
    The mapping of interface and valuetype forward declarations (section 4.9
    of the Ada mapping version 1.2) could be much simplified by using this
    feature.

    In order to preserve backward compatibility, I suggest retaining the current
    mapping using the CORBA.Foward packages, but marking that mapping as
    obsolescent.

    I propose adding a new mapping which takes advantage of the Ada2005
    "limited with" clause, accompanied by a recommendation that new code
    should use this simplified mapping.

    The example given in section 4.9.3 of formal/01-10.42,

    interface Chicken;
    interface Egg

    { Chicken hatch(); }

    ;
    interface Chicken

    { Egg lay(); }

    ;

    could be mapped as follows:

    – code mapped from interface Egg
    with CORBA.Object;
    limited with Chicken;

    package Egg is

    type Ref is new CORBA.Object.Ref with null record;

    procedure hatch (Self : in Ref; Result : out Chicken.Ref'Class);

    function To_Ref (The_Ref : in CORBA.Object.Ref'Class)
    return Ref;

    end Egg;

    – code mapped from interface Chicken
    with CORBA.Object;
    with Egg;

    package Chicken is

    type Ref is new CORBA.Object.Ref with null record;

    procedure lay (Self : in Ref; Result : out Egg.Ref'Class);

    function To_Ref (The_Ref : in CORBA.Object.Ref'Class)
    return Ref;

    end Chicken;

  • Reported: ADA 1.2 — Thu, 7 Aug 2008 04:00 GMT
  • Disposition: Closed; No Change — ADA 1.3
  • Disposition Summary:

    Introduction of Ada 2005 features into the mapping would be beyond the scope of what
    an RTF could do; it would require a full RFP to do this.

  • Updated: Fri, 6 Mar 2015 20:57 GMT