IDL4 to CPP Language Mapping Avatar
  1. OMG Specification

IDL4 to CPP Language Mapping — Open Issues

  • Acronym: IDL4-CPP
  • Issues Count: 12
  • Description: Issues not resolved
Open Closed All
Issues not resolved

Issues Descriptions

@value annotation used for enum is ambiguously defined

  • Key: IDL4CPP-56
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    Should the C++ mapping document specify that @value annotations, if specified for one field, MUST be used on all fields.

  • Reported: IDL4-CPP 1.0a1 — Mon, 18 Mar 2024 20:10 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Table 7.11 infers inheritance with something from the standard template library

  • Key: IDL4CPP-47
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    The text:
    "Inherits std::integral_constant<uint32_t, b> where b indicates
    the bit_bound of the bitmask."

    should instead state

    Defines value - Where the value is mapped as the underlying bit_bound of the bit mask.

  • Reported: IDL4-CPP 1.0a1 — Thu, 1 Feb 2024 19:12 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

@default on string and wstring?

  • Key: IDL4CPP-30
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    Can a default annotation be applied to string types (bounded and unbounded)?

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:45 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Conflicting annotation application

  • Key: IDL4CPP-29
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    What happens when the following is present in an IDL file:

    typedef @min(2) @max(1) long Huh;

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:42 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Using floating point types to instantiate pre C++20 templates

  • Key: IDL4CPP-27
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    Prior to C++20, the following template cannot be instantiated:

    template <typename T, const T thingy>
    class MyTemplate {};

    MyTemplate<double, 5.0> x;

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:33 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Can multiple annotations be contained on a type?

  • Key: IDL4CPP-28
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    For instance is this legal:

    struct S

    { @min(2) @max(5) @default(3) long f1; }

    ;

    typedef @min(2) long MyMin;
    typedef @max(5) MyMin MyMinMax;
    typedef @default(3) MyMinMax defaultedMyMinMax;

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:38 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Annotations do not discuss how they interact with language mapped constructs.

  • Key: IDL4CPP-26
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    Each annotation specified, either pre-defined or user-defined/custom, should discuss how it interacts with the IDL4 grammar such that the annotation has the desired effect (e.g. @range on a union).

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:29 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Add Example Transformation

  • Key: IDL4CPP-20
  • Status: open  
  • Source: Dassault Systemes ( Mr. Daniel Brookshier)
  • Summary:

    Not sure where (not necessarily in the noted paragraph) should include a reference to an electronic mapping file as an example. Could also include test sample IDL and corresponding C++ output. This should probably be informational and could also be in an Annex. The key reason is to show the actual transformation as well as a test/verification of the mappings. Perhaps also include versions of tools/compiler used in which the transformations were validated. In addition unit tests could be referenced or included as informative content to the spec.

  • Reported: IDL4-CPP 1.0a1 — Thu, 28 Sep 2023 20:50 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

@value annotation does not fully specify its behavior

  • Key: IDL4CPP-9
  • Status: open  
  • Source: Real-Time Innovations ( Mr. Fernando Garcia-Aranda)
  • Summary:

    The @value annotation does not fully specify the behavior. That includes:

    • The behavior for unannotated values.
    • The behavior for repeated values. Is it possible like in C++?

    DDS-XTYPES does specify the behavior of @value and such description should be added to IDL:

    7.3.1.2.1.5 Enumerated Literal Values
    Prior to this specification, it was impossible to indicate that objects of enumerated types could be stored using an integer size other than 32 bits. This specification uses the @bit_bound annotation defined in Sub Clause 8.3.4.1 of [IDL] for this purpose.

    It is important to note that the value member of the annotation may take any value from 1 to 32, inclusive, when this annotation is applied to an enumerated type. Furthermore, prior to this specification, it was impossible to provide an explicit value for an enumerated literal. The value was always inferred based on the definition order of the literals. That behavior is still supported. However, additionally, this specification allows enumerated literals to be given explicit custom values, just as they can be in the C and C++ programming
    languages. This can be done by means of the @value annotation defined in Sub Clause 8.3.1.5 of [IDL], which may be applied to individual literals.
    It is permitted for some literals in an enumerated type to bear the @value annotation while others do not. In such cases, as in C and C++ enumerations, implicit values are assigned in a progression starting from the most-recently specified value (or an implicit value of zero for the first literal, if there is no previous specified value) and adding one with each successive literal.

  • Reported: IDL4-CPP 1.0a1 — Tue, 20 Jun 2023 17:54 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Use of @range is inconsistent with IDL4 grammar

  • Key: IDL4CPP-8
  • Status: open  
  • Source: Real-Time Innovations ( Mr. Fernando Garcia-Aranda)
  • Summary:

    According to IDL4, annotations like range need to specify the arguments that are set. However, in the example we include for the mapping of @range we don't specify min and max in the arguments.

    We need to address that as follows:

    struct StructureOfRangedValues {
        @range(min=-10, max=10) long x;
    };
    
  • Reported: IDL4-CPP 1.0a1 — Tue, 20 Jun 2023 17:54 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

Specify how IDL maps compare their keys

  • Key: IDL4CPP-1
  • Status: open  
  • Source: Object Computing, Inc. - OCI ( Mr. Adam Mitz)
  • Summary:

    Keys of maps can be any IDL type. How should the generated C++ code support key comparison of any type?

  • Reported: IDL4-CPP 1.0a1 — Tue, 21 Mar 2023 17:53 GMT
  • Updated: Tue, 9 Apr 2024 00:01 GMT

The text in the C++ mapping document for bitmasks appears to contradict the text in the IDL4 specification.

  • Key: IDL4CPP-53
  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    The IDL 4 spec states the default bit_bound is 32 bits the C++ mapping document states:
    IDL bitmask declarations shall be mapped to two C++ type names:

    • An unscoped enum named <Bitmask>Bits with an explicitly defined underlying type. That underlying type
      is the smallest mapped unsigned integer type that has sufficient bits for the bit_bound of the bitmask:
      uint8_t, for values between 1 and 8; uint16_t for bit_bound values between 9 and 16; uint32_t, for
      values between 17 and 32; and uint64_t for values between 33 and 64. The <Bitmask>Bits enumerators
      are the values defined in the scope of the IDL bitmask, with each enumerator explicitly initialized to its
      corresponding integer value.
  • Reported: IDL4-CPP 1.0a1 — Fri, 1 Mar 2024 22:17 GMT
  • Updated: Fri, 1 Mar 2024 22:22 GMT