Discussion:
[ANN] IDL to C++11 draft revised submission
(too old to reply)
Johnny Willemsen
2012-02-07 09:50:52 UTC
Permalink
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.
2012-02-07 12:34:03 UTC
Permalink
Post by Johnny Willemsen
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
2012-02-08 09:22:56 UTC
Permalink
Hi,
Post by Martin B.
Post by Johnny Willemsen
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
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
Post by Martin B.
One example: In the old mapping, to have a sequence return value, you
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.
Post by Martin B.
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,

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

Loading...