DDS-XTypes 1.2 RTF Avatar
  1. OMG Issue

DDSXTY12 — Applicable key types not clearly specified

  • Key: DDSXTY12-20
  • Legacy Issue Number: 18293
  • Status: closed  
  • Source: ADLINK Advanced Technology Office ( Erik Hendriks)
  • Summary:

    In section 7.2.2.3.5.6 it is stated that every member of a struct can act as key. If that is indeed the case, then keys could be set on attributes of type sequence or union for which the resulting behaviour is not clearly specified. (For example, how to compare a key from a sequence of length 1 to a key of a sequence of length 2? How to compare unions that have the same discriminator but different branch values? How to compare unions that have different discriminator values that map onto the same branch?)

    Either setting keys on sequence and union attributes should be prohibited, or the resulting behaviour should clearly be specified.

  • Reported: DDS-XTypes 1.1 — Wed, 12 Dec 2012 05:00 GMT
  • Disposition: Resolved — DDS-XTypes 1.2
  • Disposition Summary:

    Specify members of type Union, Array and Sequence can be keys

    Unions types can either be keyed or not. If keyed, the only union attribute that can form part of the key is the discriminator as it is the only attribute guaranteed to always be there.

    To indicate a union has a key the discriminator is annotated with the @key. See 7.3.1.2.2 (the switch in the union can have annotations).

    If the Union had not declared a key (its discriminator as key). Then it is unkeyed. And when used as a member and marked as key the whole value (discriminator included) would form the key.

    Allow BitSet, Arrays and Sequence member to be used as keys. Those are simple. But not maps. These could be added later if the need arises.

  • Updated: Thu, 22 Jun 2017 16:42 GMT