[omniORB] Unimplemented interfaces - could they remain undefined

Duncan Grisby dgrisby@uk.research.att.com
Mon, 30 Oct 2000 10:46:36 +0000


On Thursday 26 October, "Ivanov, Roumen" wrote:

> interface Admin;
> interface AdminConnection;
> interface A
> {
> 	.... definitions of  PropSeq and exception Reject
> 
> 	void	connectAdmin   (in  Admin     admin_obj,
>                               in  PropSeq   admin_attr,
>                               out AdminConnection srv_obj) raises(Reject);
> 	....
> };
> 
> My implementations are derived from POA_A therefore I have to override the
> pure virtual function "connectAdmin" even if I'm not intending to implement
> administration -I will throw Reject as follows: 

[...]
> Unfortunately the linker complains about unresolved externals (methods)

Yes. To be able to compile the stubs, you have to have the stubs for
all interfaces involved, even if you don't actually use them. Is there
any particular reason for hiding the definitions of the Admin
interfaces?  By far the easiest solution is to include the stubs for
them in your program.

Failing that, one option is to declare empty interfaces and derive the
actual interfaces from them as you suggest. Another option is to
declare that your operation takes arguments of type Object, but that
loses compile-time type safety.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --