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

cpp_mapping?

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text talks about struct_mapping, but shouldn't the text refer to cpp_mapping and say that the default is STRUCT_WITH_PUBLIC_MEMBERS, the internal struct_mapping with the default is just an internal thing (maybe rename struct_mapping to just value), when I look at IDL4.2, it has in 8.3.1.2 the autoid annotation, there AutoidKind is just not mentioned and the user uses @autoid, and not @AutoidKind

  • Reported: IDL4-CPP 1.0b2 — Thu, 24 Oct 2024 11:08 GMT
  • Updated: Thu, 31 Oct 2024 10:31 GMT

Use IDL::traits

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    IDL to C++11 defines a set of IDL::traits, but this spec uses the old CORBA::traits, section A has to be updated/cleaned to use IDL::traits

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:52 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT

Change enum mapping

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The proposed enum mapping makes it harder to migrate from C+03 to C11 or newer, why not map this to a class with a _flags enum as member (same as bitmask does). The _flags enum contains the enum elements as defined in IDL, this way user code can use AnEnum::zero independent whether C03 or C+11 is used

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:48 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT

Example not matching text

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The example has the following operations for a_long (same issue happens with the others)

    void a_long(int32_t value)

    {...}
    int32_t& a_long() {...}

    int32_t a_long() const

    {...}

    a_long is a basic type, so according to the text it should have:

    <MemberType> <MemberName>()
    <MemberType> <MemberName>() const;

    Both return by value, but the example has one returning by reference.

    Also the setter for a_struct doesn't match the text, seems this chapter needs some review and tweaks

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:21 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT


MyBitMaskBits should be _flags

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text says that the code should use a _flags enum, but the example usees MyBitMaskBits

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:41 GMT
  • Updated: Fri, 11 Oct 2024 14:38 GMT

Text has issue

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text says

    An implementation of the !=, &=, and ^= bitwise operators

    But that should use operator |= and not !=

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:39 GMT
  • Updated: Fri, 11 Oct 2024 14:38 GMT

Problems in code example

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The struct MyBitMask as example code has the following buts:

    • After `flag1 = 0x01 <<` the 1 is missing
    • operator|= has an incorrect first implementation line, should be `_value |= other;`
    • operator&= has a wrong argument , should be `std::uint32_t other`
    • operator uint32_t() can be const
  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:38 GMT
  • Updated: Fri, 11 Oct 2024 14:37 GMT

Typo biset

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    This section has:

    IDL biset types shall be mapped as defined in Clause 7.14.3.2 of this specification.

    Notice the typo, biset should be bitset

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:22 GMT
  • Updated: Fri, 11 Oct 2024 14:37 GMT

Using types which use @default/@default_literal

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec is not clear when a type annotated with @default/@default_literal will really use these annotations

    For example when I have in IDL the following:

    @default(5) typedef long mylong;

    When I now use in C++

    mylong myvalue {};

    What would be the value of myvalue, would it be 5 (the default I specified), or will it be 0?

    Also when I have in IDL

    enum Color

    { GREEN, @default_literal RED, BLUE }

    ;

    And in C++ I have

    Color mycolor {};

    What is the value of mycolor, RED or GREEN?

    RTI support says these annotations are only used when the IDL type is used within a complex type (struct/union/exception), but if that is the case the IDL spec should mention this.

    Some other related questions/thinking points

    • What when using array/sequences/map of these types?
    • what about @range?
  • Reported: IDL4-CPP 1.0b2 — Fri, 4 Oct 2024 11:48 GMT
  • Updated: Fri, 11 Oct 2024 14:36 GMT

Destructor should be virtual

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    As the class ValueFactoryBase has no base class the destructor should be virtual and not override, same error is made in more examples

  • Reported: IDL4-CPP 1.0b2 — Thu, 26 Sep 2024 11:32 GMT
  • Updated: Fri, 27 Sep 2024 19:37 GMT

Definition of value_type

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The definition of value_type says `Defines type - Type to be used as return C++ type.`, but in what context is return handled. For example in the struct class mapping for type T a const and non-const accesor is defined. Shouldn't be value_type defined as `The template parameter T.`, just as A.1.1 does?

  • Reported: IDL4-CPP 1.0b2 — Thu, 26 Sep 2024 11:25 GMT
  • Updated: Fri, 27 Sep 2024 14:03 GMT