ADA 1.3 RTF Avatar
  1. OMG Issue

ADA13 — narrowing of valuetypes

  • Key: ADA13-8
  • Legacy Issue Number: 3701
  • Status: closed  
  • Source: Anonymous
  • Summary:

    Paragraph 5.2.6 of CORBA v2.3.1 specifies that "value type
    instances may be widened/narrowed to other value types. Each language
    mapping is responsible for specifying how these operations are made
    available to the programmer." Ada mapping v1.2 specifies a
    To_Abstract_Value function to widen a value type to an abstract value
    type (paragraph 1.10.2.2). The same document reads that concrete value
    types may be widened to other concrete value types using ada's view
    conversion (paragraph 1.10.2.3). However, nothing is specified to
    support narrowing of value types (concrete or abstract) to inheriting
    concrete value types.

    Proposed solution: We propose the definition of a To_Value_Ref function
    in the helper package associated with the value type, with the following
    signature:
    function To_Value_Ref
    (From : in CORBA.Value.Base'Class)
    return Value_Ref;

    The semantic of this function would be to cast the object reference
    passed as a paramater to a reference of the current interface, if it
    is legal. Otherwise, this function would raise CORBA.Bad_Param.

  • Reported: ADA 1.2 — Tue, 13 Jun 2000 04:00 GMT
  • Disposition: Resolved — ADA 1.3
  • Disposition Summary:

    Proposed solution:
    We propose the definition of a To_Value_Ref function in the helper package
    associated with the value type, with the following signature:
    function To_Value_Ref
    (From : in CORBA.Value.Base'Class)
    return Value_Ref;
    The semantic of this function would be to cast the object reference passed as a
    parameter to a reference of the current interface, if it is legal. Otherwise, this
    function would raise CORBA.Bad_Param.
    Resolution:
    Accept as suggested.

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