[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference pamsrc::objectbroker_development

Title:ObjectBroker Development - BEA Systems' CORBA
Notice:See note 2 for kit locations; note 4 for training
Moderator:RECV::GUMBELd
Created:Thu Dec 27 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2482
Total number of notes:13057

2472.0. "Inheritance: IDL, C++" by NNTPD::"[email protected]" (Paul Doyle) Tue Apr 29 1997 07:11

A question about inheritance using OBB's C++ binding.

If my IDL says

  interface A {
    void foo();
  };

  interface B : A {
    void bar();
  };

must I implement BImpl_foo() in addition to AImpl_foo()?  
A reading of the generated header files implies that the answer is either
(a) yes, or (b) no, just hand-edit the IML to perform a sort of manual 
inheritance.

Orbix does not mangle method names, so the B implementation inherits 
the A implementation's foo() automatically.

Thanks,

Paul

[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
2472.1Specify the inheritance in IML, the default IML generated won't do thatRECV::VLATASWARNING: Do not swallow the battery doorWed Apr 30 1997 08:2640
    
    >> must I implement BImpl_foo() in addition to AImpl_foo()?
    
    No, you can specify the inheritance relationship in the IML.
    For example, in your IML:
    
        implementation A 
        {
          foo()
             ...
        };
    
        implementation B : A
        {
          bar()
             ...
        };
    
    >> Orbix does not mangle method names, so the B implementation inherits
    >> the A implementation's foo() automatically.
    
    My understanding is that Orbix only allows a one-to-one mapping between
    an interface and an implementation that implements that interface. (ie:
    an implementation must implement everything in the interface and must
    also match the inheritance hierarchy of the interface).
    
    In OBB an implementation can implement operations from multiple
    independant interfaces, and ann implementation doesn't have to
    implement everything in a given interface. ie:  ImplFOO can implement
    operations from InterfaceFoo and InterfaceBAR where no relationship
    exists between the interfaces. This lets you do things like split the
    implementation of you interface across multiple implementations (which
    could be in different servers on different machines, etc...).
    
    The reason that the default IML generation created a flattened out IML
    file is that the language binding isn't taken into account during IML
    generation. If it were, it could have generated a default IML that
    matched the inheritance structure of your IDL.
                        
    Tony
2472.2Wishlist: advanced IML generatorLEMAN::DONALDSONFroggisattva! Froggisattva!Mon May 12 1997 04:2211
I think it would be nice to allow the (advanced) user the possibility
to affect IML generation. For example, by specifying what sort
of inheritance to generate: "flat" or "C++ style". Etc.

Further on the subject of IML: we've had to implement a number 
of 'fix-up' programs for OBB generated code. One of which "fixes-up"
the generated IML to contain the changes we put in the previous 
IML file. FOr instance 'activation_string'. Then we don't loose
everything each time we re-generate.

John D.
2472.3VAXCPU::michaudJeff Michaud - ObjectBrokerMon May 12 1997 11:427
> I think it would be nice to allow the (advanced) user the possibility
> to affect IML generation. For example, by specifying what sort
> of inheritance to generate: "flat" or "C++ style". Etc.

	John, please don't forget to post your suggestion in the
	official ObjectBroker_Suggestions notesfile so that it
	may be considered for a future version.