Source: Real-Time Innovations ( Sumant Tambe)
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.0b2 — Mon, 4 Jan 2016 20:20 GMT
Updated: Sun, 30 Sep 2018 23:30 GMT