Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

IDL to C++11 initial submission presentation


Published on

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

Published in: Technology, Education
  • IDL to C++11 is now a formalized language mapping. See our other presentations for details of the mapping and how to use it!
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

IDL to C++11 initial submission presentation

  1. 1. IDL to C++0x/C++11 Initial submission OMG document mars/2011-09-04Copyright © 2011 Page 1
  2. 2. 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
  3. 3. 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
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. Thanks for your attention Johnny Willemsen <> http://www.theaceorb.nlCopyright © 2011 Page 12