SlideShare a Scribd company logo
1 of 18
Download to read offline
IDL to C++11
                          Language Mapping



                   making CORBA, DDS, and CCM development
                             easy, safe, and fast



                                                       Johnny Willemsen
                                                 jwillemsen@remedy.nl


Copyright © 2012                                                          Page 1
The history of IDL to C++

        Created end of the '90s
        Two different approaches for IDL to C++ were
        proposed
        Selection was done based on formal voting, it
        was more a political decision than a technical
        one




Copyright © 2012                                         Page 2
What happened the last decade

        Lot of ideas were posted and raised throughout
        the years
        Any change to the C++ mapping would break a
        lot of code
        As a result the IDL to C++ mapping was just
        impossible to change




Copyright © 2012                                         Page 3
What changed now?

        A new revision of the C++ programming
        language itself was in progress
        This introduces several new constructs for
        which a new C++ compiler is mandatory
        When using the new C++ constructs you can't
        go back anymore to old C++
        The new C++ language is now formally
        standardized as C++11



Copyright © 2012                                      Page 4
IDL to C++11 goals

        A much more simplified mapping than the
        current C++ mapping
        Use C++11 features to
          –   Gain performance
          –   Reduce coding errors
          –   Prevent memory leaks and double deletes
          –   Reuse STL and C++11 features rather than
              reinventing them



Copyright © 2012                                         Page 5
C++11 type mapping

        Map basic types to their C++ counterparts
        IDL (w)string maps to std::(w)string
        IDL sequence maps to std::vector
        IDL array maps to std::array
        IDL fixed maps to CORBA::Fixed




Copyright © 2012                                    Page 6
Argument passing



        Argument passing for   Argument passing for
        basic types, and       complex types:
        reference types
          –   in: T            –   in: const T&
          –   inout: T&        –   inout: T&
          –   out: T&          –   out: T&
          –   return: T        –   return: T


Copyright © 2012                                      Page 7
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 (T);              void A (const T&);
      T A (void) const;        void A (T&&);
      T& A (void);             const T& A (void) const;
                               T& A (void);

Copyright © 2012                                          Page 8
Enum mapping

        IDL enum is mapped to the new C++11 enum
        class
  // IDL
  enum Color { red, green, blue };


  // C++
  enum class Color : uint32_t { red, green, blue };




Copyright © 2012                                      Page 9
Reference types (1)

        Reference types are used for
          –   Object references
          –   Valuetypes
          –   Typecodes
        Strong references behave as std::shared_ptr
        Weak references behave as std::weak_ptr
        References can only be created using
        CORBA::make_reference<>
        No C++ pointers can be passed to the API

Copyright © 2012                                        Page 10
Reference types (2)

        C++11 introduces a new type for a nil pointer:
        nullptr_t
        References can be checked for nil by
        comparing them with nullptr
        Explicit bool conversion operators for
        comparison




Copyright © 2012                                         Page 11
CORBA?

        Beta 1 specification lists CORBA as
        namespace in a few places
        Will be moved to omg idl traits that are
        independent of the specific middleware being
        used
        Allows meta programming without knowing
        whether you are using CORBA, DDS, or
        something else



Copyright © 2012                                       Page 12
Client interface mapping

        When defining interface Foo, than
        CORBA::object_traits<Foo>::ref_type (aka
        CORBA::object_reference<Foo>, aka
        Foo::_ref_type) is the object reference type
        C++ traits are used to determine types, no
        naming rules to be remembered by the user
        Narrowing using the narrow method (with
        CORBA could trigger a remote call)



Copyright © 2012                                       Page 13
Servant interface mapping

        When defining interface Foo, than
        CORBA::servant_traits<Foo>::base_type is the
        base class for the user servant class
        Servant references are available as
        CORBA::servant_traits<Foo>::ref_type (aka
        CORBA::servant_reference<Foo>)
        C++ traits are used to determine types, no
        naming rules to be remembered by the user



Copyright © 2012                                       Page 14
Client example
  // IDL to C++ Language Mapping

  CORBA::Object_var obj = orb->string_to_object(ior);
  Test::Hello_var hello = Test::Hello::_narrow(obj.in ());

  if (!CORBA::is_nil (hello.in ())) {
    CORBA::String_var the_string = hello->get_string ();
    std::cout << "hello->get_string () returned " << the_string.in () << std::endl;
    hello->shutdown ();
  }




  // IDL to C++11 Language Mapping

  CORBA::object_reference<CORBA::Object> obj = orb->string_to_object (ior);
  Test::Hello::_ref_type hello = Test::Hello::_narrow (obj);

  if (hello) {
    std::cout << "hello->get_string () returned " << hello->get_string () << std::endl;
    hello->shutdown ();
  }




Copyright © 2012                                                                          Page 15
Servant example
  // IDL to C++ Language Mapping

  class Hello : public virtual POA_Test::Hello
  {
  public:
     Hello (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)) {
     }
     virtual char * get_string (void) {
       return CORBA::string_dup ("Hello there!");
     }
     virtual void shutdown (void) {
       this->orb_->shutdown (0);
     }
  private:
     CORBA::ORB_var orb_;
  };




  // IDL to C++11 Language Mapping

  class Hello : public virtual CORBA::servant_traits<Test::Hello>::base_type
  {
  public:
     Hello (CORBA::object_reference<CORBA::ORB> orb) : orb_ (orb) {
     }
     virtual std::string get_string (void) {
       return "Hello there!";
     }
     virtual void shutdown (void) {
       this->orb_->shutdown (false);
     }
  private:
     CORBA::object_reference<CORBA::ORB> orb_;
  };




Copyright © 2012                                                               Page 16
OMG Standardization stage

        Revised submission got recommended for
        adoption at the OMG March 2012 meeting
        Finalization Task Force (FTF) has started work
        IDL to C++11 beta 1 specification available on
        the OMG website
        FTF will deliver a V1.0 specification at the OMG
        September 2012 meeting




Copyright © 2012                                           Page 17
More information

        For more information about IDL to C++11
        check:
          –   ORBzone at http://www.orbzone.org
                   ▪ Discussion forum
                   ▪ Articles
          –   Osportal at http://osportal.remedy.nl
                   ▪ More examples




Copyright © 2012                                           Page 18

More Related Content

What's hot

AMI4CCM_IDL2CPP
AMI4CCM_IDL2CPPAMI4CCM_IDL2CPP
AMI4CCM_IDL2CPPRemedy IT
 
Introduction to COBOL Programming Language
Introduction to COBOL Programming LanguageIntroduction to COBOL Programming Language
Introduction to COBOL Programming LanguageJessieBenson1
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in KotlinGiovanni Ciatto
 
ภาษาคอมพิวเตอร์
ภาษาคอมพิวเตอร์ภาษาคอมพิวเตอร์
ภาษาคอมพิวเตอร์wichaikraisorn
 
85305524 i-t-case-study
85305524 i-t-case-study85305524 i-t-case-study
85305524 i-t-case-studyhomeworkping3
 
Couverture erts2012
Couverture erts2012Couverture erts2012
Couverture erts2012AdaCore
 
CORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialCORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialRemedy IT
 

What's hot (8)

AMI4CCM_IDL2CPP
AMI4CCM_IDL2CPPAMI4CCM_IDL2CPP
AMI4CCM_IDL2CPP
 
COBOL Foundation 1
COBOL Foundation 1COBOL Foundation 1
COBOL Foundation 1
 
Introduction to COBOL Programming Language
Introduction to COBOL Programming LanguageIntroduction to COBOL Programming Language
Introduction to COBOL Programming Language
 
2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin2P-Kt: logic programming with objects & functions in Kotlin
2P-Kt: logic programming with objects & functions in Kotlin
 
ภาษาคอมพิวเตอร์
ภาษาคอมพิวเตอร์ภาษาคอมพิวเตอร์
ภาษาคอมพิวเตอร์
 
85305524 i-t-case-study
85305524 i-t-case-study85305524 i-t-case-study
85305524 i-t-case-study
 
Couverture erts2012
Couverture erts2012Couverture erts2012
Couverture erts2012
 
CORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialCORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorial
 

Similar to IDL to C++11 OMG RTWS presentations

CORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialCORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialRemedy IT
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBAPeter R. Egli
 
IDL to C++03 RFC
IDL to C++03 RFCIDL to C++03 RFC
IDL to C++03 RFCRemedy IT
 
Component Based DDS with C++11 and R2DDS
Component Based DDS with C++11 and R2DDSComponent Based DDS with C++11 and R2DDS
Component Based DDS with C++11 and R2DDSRemedy IT
 
Modernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsModernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsRemedy IT
 
Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Remedy IT
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDBChris Simmonds
 
Introduction to iOS and Objective-C
Introduction to iOS and Objective-CIntroduction to iOS and Objective-C
Introduction to iOS and Objective-CDaniela Da Cruz
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14Matthieu Garrigues
 
Modernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsModernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsRemedy IT
 
AMI4CCM, custom DDS connectors, and IDL to C++11
AMI4CCM, custom DDS connectors, and IDL to C++11AMI4CCM, custom DDS connectors, and IDL to C++11
AMI4CCM, custom DDS connectors, and IDL to C++11Remedy IT
 
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...DevOps for Enterprise Systems
 
Whats new for CDT 7.0. for Helios Release
Whats new for CDT 7.0. for Helios ReleaseWhats new for CDT 7.0. for Helios Release
Whats new for CDT 7.0. for Helios ReleaseTeodor Madan
 
IDL to C++0x Draft RFP presentation
IDL to C++0x Draft RFP presentationIDL to C++0x Draft RFP presentation
IDL to C++0x Draft RFP presentationJohnny Willemsen
 
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv Startup Club
 
Distributing computing.pptx
Distributing computing.pptxDistributing computing.pptx
Distributing computing.pptxKaviya452563
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...bhargavi804095
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREjatin batra
 

Similar to IDL to C++11 OMG RTWS presentations (20)

CORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorialCORBA Programming with TAOX11/C++11 tutorial
CORBA Programming with TAOX11/C++11 tutorial
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
 
IDL to C++03 RFC
IDL to C++03 RFCIDL to C++03 RFC
IDL to C++03 RFC
 
Component Based DDS with C++11 and R2DDS
Component Based DDS with C++11 and R2DDSComponent Based DDS with C++11 and R2DDS
Component Based DDS with C++11 and R2DDS
 
Modernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsModernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standards
 
Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDB
 
Introduction to iOS and Objective-C
Introduction to iOS and Objective-CIntroduction to iOS and Objective-C
Introduction to iOS and Objective-C
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14
 
Modernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsModernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standards
 
AMI4CCM, custom DDS connectors, and IDL to C++11
AMI4CCM, custom DDS connectors, and IDL to C++11AMI4CCM, custom DDS connectors, and IDL to C++11
AMI4CCM, custom DDS connectors, and IDL to C++11
 
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...
IBM Z for the Digital Enterprise 2018 - Leverage best language for Transforma...
 
Whats new for CDT 7.0. for Helios Release
Whats new for CDT 7.0. for Helios ReleaseWhats new for CDT 7.0. for Helios Release
Whats new for CDT 7.0. for Helios Release
 
IDL to C++0x Draft RFP presentation
IDL to C++0x Draft RFP presentationIDL to C++0x Draft RFP presentation
IDL to C++0x Draft RFP presentation
 
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
 
Distributing computing.pptx
Distributing computing.pptxDistributing computing.pptx
Distributing computing.pptx
 
Data Centric CDMI
Data Centric CDMIData Centric CDMI
Data Centric CDMI
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
 
2001_BorlandTools-Borland Corporation Product Overview.pdf
2001_BorlandTools-Borland Corporation Product Overview.pdf2001_BorlandTools-Borland Corporation Product Overview.pdf
2001_BorlandTools-Borland Corporation Product Overview.pdf
 

More from Remedy IT

Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachRemedy IT
 
AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsRemedy IT
 
AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...Remedy IT
 
Remedy IT Company presentation
Remedy IT Company presentationRemedy IT Company presentation
Remedy IT Company presentationRemedy IT
 
Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachRemedy IT
 
AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...Remedy IT
 
ACE/TAO/CIAO/DAnCE Maintenance overview
ACE/TAO/CIAO/DAnCE Maintenance overviewACE/TAO/CIAO/DAnCE Maintenance overview
ACE/TAO/CIAO/DAnCE Maintenance overviewRemedy IT
 
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...Remedy IT Revised Submission Presentation for the Unified Component Model (UC...
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...Remedy IT
 
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...Remedy IT
 
AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsRemedy IT
 
Component Technologies for Fractionated Satellites
Component Technologies for Fractionated SatellitesComponent Technologies for Fractionated Satellites
Component Technologies for Fractionated SatellitesRemedy IT
 
UCM Initial Submission presentation
UCM Initial Submission presentationUCM Initial Submission presentation
UCM Initial Submission presentationRemedy IT
 
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...Remedy IT
 
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...Remedy IT
 
Request For Proposal Unified Component Model for Distributed, Real-Time and E...
Request For Proposal Unified Component Model for Distributed, Real-Time and E...Request For Proposal Unified Component Model for Distributed, Real-Time and E...
Request For Proposal Unified Component Model for Distributed, Real-Time and E...Remedy IT
 
Test What Matters Most
Test What Matters MostTest What Matters Most
Test What Matters MostRemedy IT
 
F6COM: A Case Study in Extending Container Services through Connectors
F6COM: A Case Study in Extending Container Services through ConnectorsF6COM: A Case Study in Extending Container Services through Connectors
F6COM: A Case Study in Extending Container Services through ConnectorsRemedy IT
 
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...Draft Request For Proposal Unified Component Model for Distributed, Real-Time...
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...Remedy IT
 
Test What Matters Most
Test What Matters MostTest What Matters Most
Test What Matters MostRemedy IT
 
Component Based Model Driven Development of Mission Critical Defense Applicat...
Component Based Model Driven Development of Mission Critical Defense Applicat...Component Based Model Driven Development of Mission Critical Defense Applicat...
Component Based Model Driven Development of Mission Critical Defense Applicat...Remedy IT
 

More from Remedy IT (20)

Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approach
 
AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systems
 
AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...
 
Remedy IT Company presentation
Remedy IT Company presentationRemedy IT Company presentation
Remedy IT Company presentation
 
Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approach
 
AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...AXCIOMA, the internals, the component framework for distributed, real-time, a...
AXCIOMA, the internals, the component framework for distributed, real-time, a...
 
ACE/TAO/CIAO/DAnCE Maintenance overview
ACE/TAO/CIAO/DAnCE Maintenance overviewACE/TAO/CIAO/DAnCE Maintenance overview
ACE/TAO/CIAO/DAnCE Maintenance overview
 
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...Remedy IT Revised Submission Presentation for the Unified Component Model (UC...
Remedy IT Revised Submission Presentation for the Unified Component Model (UC...
 
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...
Revised submission for Unified Component Model (UCM) for Distributed, Real-Ti...
 
AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systems
 
Component Technologies for Fractionated Satellites
Component Technologies for Fractionated SatellitesComponent Technologies for Fractionated Satellites
Component Technologies for Fractionated Satellites
 
UCM Initial Submission presentation
UCM Initial Submission presentationUCM Initial Submission presentation
UCM Initial Submission presentation
 
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...
Remedy IT Initial Submission for the Unified Component Model (UCM) for Distri...
 
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...
Unified Component Model for Distributed, Real- Time and Embedded Systems Requ...
 
Request For Proposal Unified Component Model for Distributed, Real-Time and E...
Request For Proposal Unified Component Model for Distributed, Real-Time and E...Request For Proposal Unified Component Model for Distributed, Real-Time and E...
Request For Proposal Unified Component Model for Distributed, Real-Time and E...
 
Test What Matters Most
Test What Matters MostTest What Matters Most
Test What Matters Most
 
F6COM: A Case Study in Extending Container Services through Connectors
F6COM: A Case Study in Extending Container Services through ConnectorsF6COM: A Case Study in Extending Container Services through Connectors
F6COM: A Case Study in Extending Container Services through Connectors
 
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...Draft Request For Proposal Unified Component Model for Distributed, Real-Time...
Draft Request For Proposal Unified Component Model for Distributed, Real-Time...
 
Test What Matters Most
Test What Matters MostTest What Matters Most
Test What Matters Most
 
Component Based Model Driven Development of Mission Critical Defense Applicat...
Component Based Model Driven Development of Mission Critical Defense Applicat...Component Based Model Driven Development of Mission Critical Defense Applicat...
Component Based Model Driven Development of Mission Critical Defense Applicat...
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

IDL to C++11 OMG RTWS presentations

  • 1. IDL to C++11 Language Mapping making CORBA, DDS, and CCM development easy, safe, and fast Johnny Willemsen jwillemsen@remedy.nl Copyright © 2012 Page 1
  • 2. The history of IDL to C++ Created end of the '90s Two different approaches for IDL to C++ were proposed Selection was done based on formal voting, it was more a political decision than a technical one Copyright © 2012 Page 2
  • 3. What happened the last decade Lot of ideas were posted and raised throughout the years Any change to the C++ mapping would break a lot of code As a result the IDL to C++ mapping was just impossible to change Copyright © 2012 Page 3
  • 4. What changed now? A new revision of the C++ programming language itself was in progress This introduces several new constructs for which a new C++ compiler is mandatory When using the new C++ constructs you can't go back anymore to old C++ The new C++ language is now formally standardized as C++11 Copyright © 2012 Page 4
  • 5. IDL to C++11 goals A much more simplified mapping than the current C++ mapping Use C++11 features to – Gain performance – Reduce coding errors – Prevent memory leaks and double deletes – Reuse STL and C++11 features rather than reinventing them Copyright © 2012 Page 5
  • 6. C++11 type mapping Map basic types to their C++ counterparts IDL (w)string maps to std::(w)string IDL sequence maps to std::vector IDL array maps to std::array IDL fixed maps to CORBA::Fixed Copyright © 2012 Page 6
  • 7. Argument passing Argument passing for Argument passing for basic types, and complex types: reference types – in: T – in: const T& – inout: T& – inout: T& – out: T& – out: T& – return: T – return: T Copyright © 2012 Page 7
  • 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 (T); void A (const T&); T A (void) const; void A (T&&); T& A (void); const T& A (void) const; T& A (void); Copyright © 2012 Page 8
  • 9. Enum mapping IDL enum is mapped to the new C++11 enum class // IDL enum Color { red, green, blue }; // C++ enum class Color : uint32_t { red, green, blue }; Copyright © 2012 Page 9
  • 10. Reference types (1) Reference types are used for – Object references – Valuetypes – Typecodes Strong references behave as std::shared_ptr Weak references behave as std::weak_ptr References can only be created using CORBA::make_reference<> No C++ pointers can be passed to the API Copyright © 2012 Page 10
  • 11. Reference types (2) C++11 introduces a new type for a nil pointer: nullptr_t References can be checked for nil by comparing them with nullptr Explicit bool conversion operators for comparison Copyright © 2012 Page 11
  • 12. CORBA? Beta 1 specification lists CORBA as namespace in a few places Will be moved to omg idl traits that are independent of the specific middleware being used Allows meta programming without knowing whether you are using CORBA, DDS, or something else Copyright © 2012 Page 12
  • 13. Client interface mapping When defining interface Foo, than CORBA::object_traits<Foo>::ref_type (aka CORBA::object_reference<Foo>, aka Foo::_ref_type) is the object reference type C++ traits are used to determine types, no naming rules to be remembered by the user Narrowing using the narrow method (with CORBA could trigger a remote call) Copyright © 2012 Page 13
  • 14. Servant interface mapping When defining interface Foo, than CORBA::servant_traits<Foo>::base_type is the base class for the user servant class Servant references are available as CORBA::servant_traits<Foo>::ref_type (aka CORBA::servant_reference<Foo>) C++ traits are used to determine types, no naming rules to be remembered by the user Copyright © 2012 Page 14
  • 15. Client example // IDL to C++ Language Mapping CORBA::Object_var obj = orb->string_to_object(ior); Test::Hello_var hello = Test::Hello::_narrow(obj.in ()); if (!CORBA::is_nil (hello.in ())) { CORBA::String_var the_string = hello->get_string (); std::cout << "hello->get_string () returned " << the_string.in () << std::endl; hello->shutdown (); } // IDL to C++11 Language Mapping CORBA::object_reference<CORBA::Object> obj = orb->string_to_object (ior); Test::Hello::_ref_type hello = Test::Hello::_narrow (obj); if (hello) { std::cout << "hello->get_string () returned " << hello->get_string () << std::endl; hello->shutdown (); } Copyright © 2012 Page 15
  • 16. Servant example // IDL to C++ Language Mapping class Hello : public virtual POA_Test::Hello { public: Hello (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)) { } virtual char * get_string (void) { return CORBA::string_dup ("Hello there!"); } virtual void shutdown (void) { this->orb_->shutdown (0); } private: CORBA::ORB_var orb_; }; // IDL to C++11 Language Mapping class Hello : public virtual CORBA::servant_traits<Test::Hello>::base_type { public: Hello (CORBA::object_reference<CORBA::ORB> orb) : orb_ (orb) { } virtual std::string get_string (void) { return "Hello there!"; } virtual void shutdown (void) { this->orb_->shutdown (false); } private: CORBA::object_reference<CORBA::ORB> orb_; }; Copyright © 2012 Page 16
  • 17. OMG Standardization stage Revised submission got recommended for adoption at the OMG March 2012 meeting Finalization Task Force (FTF) has started work IDL to C++11 beta 1 specification available on the OMG website FTF will deliver a V1.0 specification at the OMG September 2012 meeting Copyright © 2012 Page 17
  • 18. More information For more information about IDL to C++11 check: – ORBzone at http://www.orbzone.org ▪ Discussion forum ▪ Articles – Osportal at http://osportal.remedy.nl ▪ More examples Copyright © 2012 Page 18