[PolyORB-users] Local objects: another idea

Jerome Hugues hugues@infres.enst.fr
Tue, 6 Jan 2004 12:30:58 +0100


Vadim Godunko (vgodunko@rost.ru):

> Hello,
> 
> As I undestood, CORBA unconstrained interface references always as a 
> PolyORB.References.Ref.
> 
> May be define local objects as "not PolyORB.References"?
> 
> For example add to PolyORB.References such subprogram:
> 
>    function Is_Reference (R : in Ref) return Boolean is
>    begin
>       if not Is_Nil (R) then
>          return Entity_Of (R).all in Reference_Info'Class;
>       else
>          return True;
>       end if;
>    end Is_Reference;

By doing so, you cannot distinguish Nil reference on an non-local
objects and local object. This may lead to confusions.

My reading of par. 1.10.7.2 of IDL/Ada mapping is that local refs
ultimately derive from CORBA.Object.Ref; (implicitely) they may derive
from an intermediate object, e.g.

so that you may have the following inheritance tree

CORBA.Object.Ref
+
+- My_Ref for unconstrained references
+
+- PolyORB.CORBA_P.Local_Object.Ref
   +
   +- My_Local_Ref for any local interface

PolyORB.CORBA_P.Local_Object.Ref will overload any primitive operations
of CORBA.Object.Ref that require specific handling of local references.

Any opinion ?

-- 
Jerome