DDS-PSM-Cxx 1.0b2 FTF Avatar
  1. OMG Issue

DDSPSMC — Supporting automatic conversion from value types to delegate types

  • Key: DDSPSMC-14
  • Legacy Issue Number: 16405
  • Status: closed  
  • Source: Real-Time Innovations ( Sumant Tambe)
  • Summary:

    Supporting some vendor-specific extension api is significantly easier using automatic conversion from value types to the delegate types. The situation arises when an extension method defined in the idds namespace takes a parameter defined only in the idds namespace. The parameter type may also be used as a delegate elsewhere. While the programmers can use the -> operator to invoke the extension method, the parameter need must be obtained using the delegate() method of the value type. It would be quite seamless to support automatic convertibility from value types to the delegate.

    Proposed Solution:
    Define two additional generic conversion operators in dds::core::Value<D> template.

    operator D & ()

    { return d_; }
    operator const D & () const { return d_; }

    ;

  • Reported: DDS-PSM-Cxx 1.0b1 — Fri, 29 Jul 2011 04:00 GMT
  • Disposition: Resolved — DDS-PSM-Cxx 1.0b2
  • Disposition Summary:

    The suggested conversion operators have been added into the Value and Reference classes.
    See:
    dds-psm-cxx/src/hpp/dds/core/Reference.hpp
    dds-psm-cxx/src/hpp/dds/core/Value.hpp

  • Updated: Fri, 6 Mar 2015 20:58 GMT