-
Key: DDSPSMC11_-6
-
Status: open
-
Source: Real-Time Innovations ( Mr. Alejandro Campos)
-
Summary:
The free-standing functions read() and take() should not be templates.
They are meant to be passed as function pointers to the streaming ManipulatorSelector API:
dr >> read >> ... >> loaned_samples;
This syntax is not possible with the current definition of read() and take(), because they require an explicit template argument.
Proposed solution:
Remove the template argument, but leave a dummy argument to avoid users passing in any no-argument function.DataReader.hpp- template <typename SELECTOR> - SELECTOR& read(SELECTOR& selector); + OMG_DDS_API + bool read(dds::sub::ReadModeDummyType); - template <typename SELECTOR> - SELECTOR& take(SELECTOR& selector); + OMG_DDS_API + bool take(dds::sub::ReadModeDummyType);
TDataReader.hpp+class ReadModeDummyType {}; … - ManipulatorSelector - operator >> (ManipulatorSelector& (manipulator)(ManipulatorSelector&)); + ManipulatorSelector& + operator >>(bool(*manipulator)(ReadModeDummyType))
-
Reported: DDS-PSM-Cxx 1.0b2 — Wed, 13 Jul 2016 17:41 GMT
-
Updated: Sun, 30 Sep 2018 23:27 GMT
DDSPSMC11_ — API corrections required to ManipulatorSelector and related functions
- Key: DDSPSMC11_-6
- OMG Task Force: DDS-PSM-Cxx v1.1 RTF