[omniORB] IDL interface insufficient
David
movling at gmail.com
Thu Apr 17 17:03:01 BST 2008
Hi,
I'm having a problem with my IDL interface. I have a RemoteProxy class that
wraps an object on the server. On the server side, the factory creating the
RemoteProxy object needs to inject the wrapped object somehow. The interface
of RemoteProxy is however specified in IDL, and I can't specify my wrapped
object in IDL, and hence can't pass it as an argument to an IDL-specified
method.
So far, I have been able to add a RemoteProxy_i.setWrappedObject(
WrappedObject *o ) method to the RemoteProxy_i class, which is my object
implementation class (inheriting from POA_RemoteProxy). So when I create it,
I can do:
RemoteProxy_i *rp = new RemoteProxy_i();
rp->setWrappedObject( o );
poa->activate_object( rp );
RemoteProxy_ptr ref = rp->_this();
Once I've created the reference object "ref", "rp" is not saved. Now, my
problem is that I can't get the wrapped object "o" back from "ref", because
"ref" only implements the IDL interface. How should I solve this? Do I need
an external data structure, mapping references to "wrapped objects" (except
they wouldn't be mapped in an object-oriented sense). Any help is
appreciated.
/David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080417/078533a5/attachment.htm
More information about the omniORB-list
mailing list