Boost logo

Boost :

Subject: Re: [boost] Any interest in creating new CORBA IDL to C++ mapping?
From: Schrader, Glenn - 1002 - MITLL (gschrad_at_[hidden])
Date: 2010-08-02 12:11:41


The OMG is defining a new ISO C++ mapping for DDS. Note that
DDS uses the CORBA mapping to define its interfaces. Even though
this is DDS; it is closely related to the CORBA spec. The new
mapping spec is currently a "work in progress" and only available
to OMG members but I believe that there will be a public version in
September.

However, there is a LGPL project run by PrismTech (a DDS vendor)
called SIMD (SIMple Dds, see http://code.google.com/p/simd-cxx/).
SIMD appears to be an incubator for DDS in the same way that boost
is an incubator for the std c++ libraries and has a prototype
implementation of the new interfaces. SIMD appears to be doing
the obvious things like using std::vector for sequences etc. This
looks like a good place to look to get an early look at what they're
thinking of. I also wonder if some of this could make its way back
into the CORBA C++ mapping. If nobody has a similar incubator for
CORBA then perhaps this boost library could take on that role.

--glenn

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Johnny Willemsen
> Sent: Monday, August 02, 2010 10:09 AM
> To: boost_at_[hidden]
> Cc: Jon Biggar
> Subject: Re: [boost] Any interest in creating new CORBA IDL
> to C++ mapping?
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Interesting proposals, I agree, lets think big and see what
> the best mapping could be. Not worry about the old mapping,
> just make something completely new.
>
> Johnny
>
> On 08/02/2010 03:59 PM, Jon Biggar wrote:
> > On 7/22/10 7:57 AM, Mathias Gaunard wrote:
> >> On 14/07/10 22:58, Kevin Heifner wrote:
> >>
> >>> - IDL string is std::string
> >>> - IDL sequence and array are std::vector
> >>> - Java maps them to the same thing
> >>>
> >>> std::vector<octet> object_id();
> >>> std::shared_ptr<Object> id_to_reference(const
> std::vector<octet>&);
> >> >
> >>
> >> Can you use templates?
> >> When you take strings/sequences, why not take ranges instead of
> >> specific types the user would have to convert to?
> >
> > YES! YES! YES!
> >
> > Although it's tricker than you think, because IDL allows you to
> > declare composite types with embedded sequences.
> >
> > I'd like to see IDL sequences mapped into templates that use trait
> > classes that allow the programmer to use any of the appropriate STL
> > ordered container abstractions (vector, list, deque, or user defined
> > ones) as the underlying storage. IDL sequence classes
> should also be
> > a sequence container so that <algorithm> works with them.
> >
> > So something like this:
> >
> > // IDL
> > struct Foo {
> > long l;
> > string s;
> > };
> >
> > typedef sequence<Foo> FooSeq;
> >
> > interface Bar {
> > FooSeq manipulate(in FooSeq arg);
> > };
> >
> > would map to something like this:
> >
> > // C++
> > struct Foo {
> > CORBA::Long l;
> > std::string s;
> > };
> >
> > template <
> > class Storage = CORBA::ConcreteSequenceStorage<std::vector,Foo>
> >> class FooSeq : public CORBA::AbstractSequence<Foo> {
> > ...
> > };
> >
> > class Bar : public CORBA::Object {
> > template<class _ResultType = FooSeq<>,
> > class _argType = FooSeq<> >
> > virtual _ResultType manipulate(
> > const CORBA::SequenceInAdapter<_argType> &arg
> > ) = 0;
> > };
> >
> > // Example client code
> >
> > Bar mybar = ...; // get from a factory somewhere
> >
> > FooSeq<> simpleresult, simplearg;
> >
> > simpleresult = bar->manipulate<>(simplearg);
> >
> > // or for the more adventurous
> >
> > typedef FooSeq<CORBA::ConcreteStorage<std::list,Foo> MyFoo; MyFoo
> > myresult MyFoo myarg;
> >
> > myresult = mybar->manipulate<MyFoo>(arg);
> >
> > // and perhaps even
> >
> > typedef CORBA::SequenceResultContainerAdaptor<std::deque,Foo>
> > MyFooResult;
> > std::deque<Foo> myresult2;
> > std::set<Foo> myarg2;
> >
> > myresult2 = mybar->manipulate<MyFooResult>(myarg2);
> >
> > Let's think big.
> >
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.15 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJMVtFmAAoJEF6eObUNSFTQL0MH/2TWKdUPgOHw4Nu7HjVkG6uM
> 4rNYAl+Dx515rBpqHPfFBGmoq9tCnN1621ZzYVVfN6w1jAWRDZyhb3bGKGCqk08b
> TNckNbq6w0HgF6aRQxcIc+5wk4KbBgCaictIh8XESdc6tbvt7L3u+Pv31ebl8b2Z
> PGFWQIWMINzfgmu/06tKQwi9BbjPhPktSJAuWtu+Sdl8E2wre/WkQC1h9G2hfQfz
> 4j2Kp9brJiaj0WO8+KxMdardykC8Uw3vuTPWOHxDnWZLQX3unyttur6kq8TFu1Qu
> J2kL9eK+sYdpi7Egz35Hm8hQDN81Zmd9bg72N8XtRr+6fvPJQG6WnvDLLXUqBt8=
> =t+xG
> -----END PGP SIGNATURE-----
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk