[omniORB] Problem with narrow

Carlos Marmelo cmarmelo@oktal.fr
Wed, 15 Nov 2000 18:48:40 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C04F34.ABBDA4C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

Could you please send me a response, if you know something about that :

I am using OminORB 2.7.1 and I'm compiling with Visual C++ 6.0.
I've defined an Idl class called oktalScenario::Scene and another =
derived from this last one, called oktalDistributedScenario::Scene.

So 2 skeletons are generated in C++.

I implemented oktalScenario::Scene by virtual inheritance in the class =
SpecRayScenario::SceneImpl.

I've also implemented oktalDistributedScenario::Scene in the class =
SpecRayDistributedScenario::DSceneImpl, but this class inherit also from =
the implementation SpecRayScenario::SceneImpl.

I have problems when I want to narrow an =
oktalDistributedScenario::Scene_ptr in an oktalScenario::Scene_ptr, =
since in the _narrow function there is recursive call on the =
_widenFromTheMostDerivedIntf function of the class oktalScenario::Scene.

the call "if ((_p =3D =
oktalScenario_Scene::_widenFromTheMostDerivedIntf(repoId))) {"
doesn't call the function of the class oktalScenario::Scene but call the =
function of oktalDistributedScenario::Scene.
It acts as it was using polymorphism.

Using narrow with a class that multi-inherits cause problems.

I could resolve it by using delegation instead of multi-inheriting, but =
is there another solution.

Thank you for your response.

Carlos Marmelo
Oktal corporation
France - Toulouse.


------=_NextPart_000_0005_01C04F34.ABBDA4C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could you please send me a response, if =
you know=20
something about that :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am using OminORB 2.7.1 and I'm =
compiling with=20
Visual C++ 6.0.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I've defined an Idl class called=20
oktalScenario::Scene and another derived from this last one, called=20
oktalDistributedScenario::Scene.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So 2 skeletons are generated in =
C++.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I implemented =
oktalScenario::Scene&nbsp;by virtual=20
inheritance in the class SpecRayScenario::SceneImpl.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've also&nbsp;implemented=20
oktalDistributedScenario::Scene in the class </FONT><FONT face=3DArial=20
size=3D2>SpecRayDistributedScenario::DSceneImpl, but this class =
inherit&nbsp;also=20
from the implementation SpecRayScenario::SceneImpl.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have problems when&nbsp;I want to =
narrow an=20
oktalDistributedScenario::Scene_ptr in an oktalScenario::Scene_ptr, =
since in the=20
_narrow function there is recursive call on the =
_widenFromTheMostDerivedIntf=20
function of the class oktalScenario::Scene.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the call "if ((_p =3D=20
oktalScenario_Scene::_widenFromTheMostDerivedIntf(repoId))) =
{"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>doesn't call the function of the class=20
oktalScenario::Scene but call the function of=20
oktalDistributedScenario::Scene.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It acts as it was using =
polymorphism.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Using narrow with a class that =
multi-inherits cause=20
problems.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I could resolve it by using delegation =
instead of=20
multi-inheriting, but is there another solution.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you for your =
response.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Carlos Marmelo</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Oktal corporation</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>France - Toulouse.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_0005_01C04F34.ABBDA4C0--