[orbitcpp-list] problem with the type_container approach...
Status: Beta
Brought to you by:
philipd
From: Phil D. <ph...@us...> - 2000-04-13 19:39:53
|
Hi Andreas, Hi all, Not really a problem, just an oversight which means the servant may be forced to link with the stubs. With the current approach, any types declared in the idl interface: e.g. interface foo { exception bah { }; }; go in the type_container class, i.e.: foo-cpp-common.hh ----------------- namespace _orbitcpp { namespace type_container { class Foo { class bahException : public UserException { ... }; ... }; }} foo-cpp-stubs.hh ---------------- class Foo : public CORBA::Object, public _orbitcpp::type_container::Foo { } This means that the poa servant cannot reference the exception using the fully qualified ::Foo::BahException without linking with the stubs, since otherwise the compiler doesn't know that Foo inherits from _orbitcpp::type_container::Foo. If I understand the spec correctly, the servant doesn't have to inherit from the interface class, and so referenceing the exception using its fully-qualified name is the only way to portably reference it. Instead I propose that we do the following to fix the above problem: foo-cpp-common.hh ----------------- class Foo { class BahException : public UserException { ... }; ... }; and in foo-cpp-stubs.hh ----------------------- class Foo_stub : public CORBA::Object, public Foo { } i.e. the type_container class becomes the named corba interface class, and a seperate stub class is used for the stub. I wrote the code to do this on the train back from London today, but I'll need to merge it with your checked in code (and get the inheritance stuff working with the new scheme). I thought I'd wait and see if you have any thoughts before checking it in. Sorry if the above is a little hard to follow - I wrote this in a hurry, Cheers, Phil. |