Language Mapping for Modules
  • IDL modules should be turned into C++ namespaces
    • The IDL declaration for the Auction looks like:
        module Auction 
        {
             ...
        } ;
        
    • The corresponding namespace declaration for C++ appears in Code Sample 10
    • Since namespace support is compilers tends to be somewhat fragile, the OMG allows two alternative means for representing module scoping:
      • Nested classes, with the outer class representing the module and inner classes representing interfaces
      • A flat representation in which the module name and type name are concatenated together with the underscore character as a separator

Next Slide >>