Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] IDL to C++11 draft revised submission

6 views
Skip to first unread message

Johnny Willemsen

unread,
Feb 7, 2012, 4:50:52 AM2/7/12
to
Hi all,

Remedy IT is working on a new IDL to C++11 revised submission. We have
published a draft document with a set of examples on our OSportal
community site. You can find this online at
https://osportal.remedy.nl/projects/idl2cppx0

Regards,

Johnny Willemsen
Remedy IT
http://www.theaceorb.nl

Martin B.

unread,
Feb 7, 2012, 7:34:03 AM2/7/12
to
On 07.02.2012 10:50, Johnny Willemsen wrote:
> Hi all,
>
> Remedy IT is working on a new IDL to C++11 revised submission. We have
> published a draft document with a set of examples on our OSportal
> community site. You can find this online at
> https://osportal.remedy.nl/projects/idl2cppx0
>

I currently haven't got the time to look at all this, but one thing I've
been wondering about the new mapping:

Is the developer (implementer) of an interface / of a client still
required to use operator `new` at *any* point? Or is it now all wrapped
up in proper handle-classes?

One example: In the old mapping, to have a sequence return value, you
had something like this:

MyTypeSeq* CC::f() {
MyTypeSeq_var s(new MyTypeSeq());
...
return s._retn();
}

Is there still *any* point in the new mapping where I am required to
create something on the heap via `new` explicitly?

cheers,
Martin


--
I'm here to learn, you know.
Just waiting for someone,
to jump from the shadows,
telling me why I'm wrong.

Johnny Willemsen

unread,
Feb 8, 2012, 4:22:56 AM2/8/12
to Martin B.
Hi,

>> Remedy IT is working on a new IDL to C++11 revised submission. We have
>> published a draft document with a set of examples on our OSportal
>> community site. You can find this online at
>> https://osportal.remedy.nl/projects/idl2cppx0
>>
>
> I currently haven't got the time to look at all this, but one thing I've
> been wondering about the new mapping:
>
> Is the developer (implementer) of an interface / of a client still
> required to use operator `new` at *any* point? Or is it now all wrapped
> up in proper handle-classes?

The sequence is now just mapped to std::vector as returned by value. By
using the C++11 move semantics you can prevent easily a copy at that moment

> One example: In the old mapping, to have a sequence return value, you
> had something like this:
>
> MyTypeSeq* CC::f() {
> MyTypeSeq_var s(new MyTypeSeq());
> ...
> return s._retn();
> }

All _ptr/_var/_duplicate calls are gone. Argument passing is by value
for basic types, object references, and enums, all others are passed by
reference.

> Is there still *any* point in the new mapping where I am required to
> create something on the heap via `new` explicitly?

We have limited it to the minimal, local objects and servants you have
to create with new and than you transfer ownership to the object
references. For anything else, it is not required anymore.

Best regards,
0 new messages