Source: Remedy IT ( Johnny Willemsen)
For creating a client side reference the specification uses currently CORBA::make_reference but this logic is not really CORBA specific and in a LwCCM system which only uses local interfaces the usage of CORBA is polluting user code. One of the key concepts of IDL to C++11 is that the user doesn't need to remember any special naming rules so we don't want to tie a factory function to some implementation name. The IDL to C++11 specification already uses the IDL::traits<> concept which is specialized based on the IDL type. We propose to extend the IDL::traits<> for interfaces/valuetypes for a make_reference factory method so that user code given an interface A can create an object reference using IDL::traits<A>::make_reference.
In the specification we propose the following changes:
6.7.1, replace CORBA::make_reference with IDL::traits<>::make_reference
126.96.36.199 replace CORBA::make_reference <StringValue> with IDL::traits<StringValue>::make_reference
188.8.131.52 replace CORBA::make_reference<> with IDL::traits<>::make_reference
6.25 replace CORBA::make_reference<> with IDL::traits<>::make_reference and CORBA::make_reference <MyLocalIF> (); with IDL::traits<MyLocalIF>::make_reference ();
The CORBA::make_reference() can be easily kept by an implementation for backwards compatibility but this proposal enables the user to write code that is more CORBA independent
Reported: CPP11 1.5 — Tue, 15 Jun 2021 09:24 GMT
Disposition: Resolved — CPP 1.6
Move make_reference into the traits class
The CORBA::make_reference function template as currently specified is a top-level member of the CORBA namespace. Some uses of IDL (and this mapping) are non-CORBA, for example lightweight CCM/UCM or DDS. This change moves make_reference into the traits which lives in the IDL top-level namespace.
Updated: Thu, 31 Mar 2022 19:32 GMT