IDL to C++11 initial submission presentation
Upcoming SlideShare
Loading in...5

IDL to C++11 initial submission presentation



Presentation given to the OMG mars community related to our IDL to C++11 initial submission

Presentation given to the OMG mars community related to our IDL to C++11 initial submission



Total Views
Views on SlideShare
Embed Views



3 Embeds 9 5 3 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

IDL to C++11 initial submission presentation IDL to C++11 initial submission presentation Presentation Transcript

  • IDL to C++0x/C++11 Initial submission OMG document mars/2011-09-04Copyright © 2011 Page 1
  • RFP asks for The new mapping should be functionally equivalent to the existing IDL to C++ mapping. While the syntax may change, an application should be able to implement functionality identical to that which can be achieved with the current IDL to C++ mapping. Applications programmed using alternative language mappings should inter operate transparently. An application utilizing this new language mapping should have no awareness, other than informational, of what language mapping a peer application is using. The new language mapping should be designed to co-exist with other technologies. Specifically, it should not interfere with the namespaces used by other OMG specifications, or commonly used packages. Interoperability between the IDL to C++ and IDL to C++0x mapping in the same compilation unit is not required.Copyright © 2011 Page 2
  • C++11 C++0x was unanimously approved August 12 th 2011 Is now formally available as ISO/IEC 14882:2011 Unofficially named C++11Copyright © 2011 Page 3
  • Goal of IDL to C++11 Simplified mapping for C++11 Make use of the new C++11 features to – Gain performance – Reduce coding errors – Reduce amount of code – No need to create conversion between STL/C++ types and IDL based typesCopyright © 2011 Page 4
  • Concepts Map basic types to their C++11 counterparts IDL (w)string map to std::(w)string IDL sequences map to std::vectorCopyright © 2011 Page 5
  • Interface mapping When defining interface Foo, than Foo is the object reference C++ traits are used to determine the type for the proxy and skeleton base classes, not the name and how they are implemented – Foo::local_base_type – Foo::servant_type – Foo::servant_base_type Foo as object reference has the semantics of std::shared_ptr<>Copyright © 2011 Page 6
  • Nil object references C++11 has a new type for a nil pointer: nullptr_t Object references can be checked for nil by comparing them with nullptr Explicit bool conversion operators for usage in for example if statementsCopyright © 2011 Page 7
  • Argument passing Argument passing is the same for any type – in: const T& – inout: T& – out: T& – return: T C++ method interfaces will not change if for example a typedef is changed from basic type to complex type.Copyright © 2011 Page 8
  • Struct/union Struct and union now both map to a C++ class Providing constructor(s), copy and move operators Set of accessors for each member: – void A (const T&); – void A (T&&); – const T& A (void) const; – T& A (void);Copyright © 2011 Page 9
  • What next? Address comments on initial submission Add mapping for arrays/abstract/valuetype/any Extend mapping with sequence traits, ostream insertion operators, and more if needed Check out IDL annotations when they are part of the formal IDL specification. Mostly interesting for user defined mapping of IDL types.Copyright © 2011 Page 10
  • Proof of concept New language binding for TAO: IDL2C++11 Supports the initial submission and more More details on and http://www.orbzone.orgCopyright © 2011 Page 11
  • Thanks for your attention Johnny Willemsen <> http://www.theaceorb.nlCopyright © 2011 Page 12