IDL4-CSHARP 1.0 FTF Avatar
  1. OMG Issue

IDL4CSP — Missing option in @csharp_mapping annotation to document mapping to standalone constant classes

  • Key: IDL4CSP-14
  • Status: closed  
  • Source: Real-Time Innovations ( Mr. Fernando Garcia-Aranda)
  • Summary:

    The @csharp_mapping annotation introduced in Clause 8.1 provides an argument to select the alternative constants mapping and provide a name for the class that scopes a group of contants. However, there current syntax does not allow indicating that mapped constants shall be mapped as standalone classes, which is the other mapping option. Perhaps, we could give a name for the mapping that maps constants to standalone classes, and map that to setting constants_container to an empty string.

    As a side issue with constants, in both mappings the classes that contain the constants are not static. This may confusing as you could create instances of a class that only has constants, which are static. Perhaps, the "Standalone Constants Mapping" should create classes that are "public static" (which are also sealed), and the alternative mapping should create "public static partial" classes.

  • Reported: IDL4-CSHARP 1.0a1 — Fri, 30 Oct 2020 17:01 GMT
  • Disposition: Resolved — IDL4-CSHARP 1.0
  • Disposition Summary:

    Extend constants_container parameter of @csharp_mapping to specify how to map to standalone classes and convert classes containng constants to static classes

    This resolution provides names for the two mapping options for constants and specifies how to select each of them using the @csharp_mapping annotation. It also converts the classes that wrap constants in both mapping options into "static classes".

    The resolution to this issue must be applied after the resolution of IDL4CSP-4.

  • Updated: Mon, 29 Mar 2021 12:23 GMT