IDL 4.3 RTF Avatar
  1. OMG Issue

IDL43 — Annotation for union discriminator name

  • Key: IDL43-42
  • Status: open  
  • Source: Airbus Group ( Mr. Oliver M. Kellogg)
  • Summary:

    Predecessor: CPP1116-3

    For mapping the switch of unions, the language mappings choose different fixed names.
    It would be desirable to permit names that reflect the user's application domain.
    Example:

      enum environment_t { air, water, land };
    
      @switchname("environment")
      union env_info_t switch (environment_t) {
        case air:
          air_info_t air_info;
        case water:
          [...]
      };
    

    The @switchname annotation would cause the discriminator to be mapped using the given name.

    This may replace the name chosen by the language mapping (such as in the Ada mapping), or it may supplement the mapping chosen name (such as in the C++ mapping), depending on the nature of the mapped union.

    The provided name may not overlap with an enum value given in a case and it may also not overlap with a branch member name.

  • Reported: IDL 4.2 — Sat, 1 May 2021 16:43 GMT
  • Updated: Sun, 23 May 2021 10:32 GMT