DDS-PSM-Cxx 1.1 RTF Avatar
  1. OMG Issue

DDSPSMC11 — Provide extension constructors for standard classes

  • Key: DDSPSMC11-44
  • Status: open  
  • Source: Real-Time Innovations ( Sumant Tambe)
  • Summary:

    The specification does not seem to provide any "standard" way to pass vendor-specific arguments to constructors of standard classes. As constructor is a special function, the trick of overloading operator -> (used for vendor-specific member functions) does not work.

    Take DataState for example: We need to pass more that just InstanceState, ViewState, and SampleState.

    Proposed Resolution: (1) Add overly-generic template constructors that accepts any number of generic arguments. For instance,

    template <class Arg1, class Arg2, class Arg3>
    Class(Arg1 &, Arg2 &, Arg3 &);

    Some classes like DataState may be extended with operator >> template. This style is used in DataReaderQos and DataWriterQos.

    RTI is not thrilled about this option. However, it may solve similar problems in all the classes that need vendor-specific constructors.

    Alternatively, (2) Allow vendor-specific constructors and member-functions in standard classes. The standard simply needs to say that it is allowed.

  • Reported: DDS-PSM-Cxx 1.0 — Mon, 4 Jan 2016 20:20 GMT
  • Updated: Tue, 13 Sep 2016 22:48 GMT