unbuildable code generated for inheritance?



Hi folks:

I am attempting to use #pragma inhibit in order to derive an interface
from one that is defined in a separate idl file:

//Parent.idl:
module Foo {
  interface Parent {
    void foo ();
  };
};
// end Parent.idl

//Child.idl
#pragma inhibit push
#include "Parent.idl"
#pragma inhibit pop
module Foo {
  interface Parent;
  interface Child : Parent {
    void bar ();
  };
};

Unfortunately the resulting Child-common.c won't build, because
Child.h contains references to the Parent POA that are not resolved. 
Inserting #include "Parent.h" into Child.h works, but of course I
don't want to go hacking autogenerated code ;-)

Any clues as to the "right" solution ?

Thanks,

-Bill

P.S. - While I'm asking, #pragma inhibit doesn't seem to work right
for structs either, only interfaces (i.e. all the interfaces using a
given struct seem to need to be in the idl file where the struct is
defined).  Should that be so?
--------------
Bill Haneman
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]