Overview | Returns a reference to the CORBA::ImplementationDef describing the server in which a remote object resides. |
Original class | CORBA::Object |
Exceptions | CORBA::SystemException |
Intended Usage
This method is used to obtain the CORBA::ImplementationDef object describing the server in which a remote object resides. When invoked on a proxy object, this method is forwarded to the remote object, and a proxy to a remote CORBA::ImplementatinDef object (residing in the same server as the remote object) is returned. When invoked on a local object residing in a server, the local CORBA::ImplementationDef object (the one originally passed to CORBA::BOA::impl_is_ready) is returned. When invoked on a local object in a client (that is not also a server), NULL is returned.
Syntax
virtual CORBA::ImplementationDef_ptr _get_implementation () = 0;
Input parameters
None.
Return values
Example
/* The following is a C++ example */ #include "corba.h" #include <string.h> /* Assume p is a proxy object pointer derived from CORBA::Object class the following will get the impl def and interface def on remote objects */ CORBA::ImplementationDef_ptr impl; CORBA::InterfaceDef_ptr intf; string str; impl = p->_get_implementation(); if(impl) { str = impl->get_alias(); /* get implementation alias */ /* ensure it's the right impl and work with the impl */ ... } else /* generate exception */ ... intf = p->_get_interface(); if(intf) { str = intf->id(); /* get interface id */ /* ensure it's the right interface and work with the intf */ ... } else /* generate exception */ ... CORBA::release(p);