<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=088165214-20092006>In the example given below. You can easily call
getBalance() with the Account_ptr.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=088165214-20092006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=088165214-20092006>double balance =
account->getBalance();</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=088165214-20092006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=088165214-20092006>I don't see any need to get an Account_I
*.</SPAN></FONT></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>...Tim<BR>--<BR> Tim
Theisen
Lead Research Software Engineer<BR>Phone: +1 608 824
2848
TomoTherapy Incorporated<BR> Fax: +1 608 824
2996
1240 Deming Way<BR> Web: <A
href="http://www.tomotherapy.com/">http://www.tomotherapy.com</A>
Madison, WI 53717-1954 <BR><BR></FONT></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> omniorb-list-bounces@omniorb-support.com
[mailto:omniorb-list-bounces@omniorb-support.com] <B>On Behalf Of </B>Tuyen
Chau<BR><B>Sent:</B> Tuesday, September 19, 2006 15:29<BR><B>To:</B> JHJE (Jan
Holst Jensen)<BR><B>Cc:</B> OmniOrb<BR><B>Subject:</B> Re: [omniORB] How to
convert an object reference to a servant?<BR></FONT><BR></DIV>
<DIV></DIV>Since I didn't make myself very clear in the topic, let me give you
an example this time. Consider this IDL,<BR><BR>interface Account
{<BR> double getBalance();<BR>
...<BR>};<BR><BR>interface BankManager {<BR> Account
getAccount( in string name );<BR><BR> void deleteAccount( in
account);<BR>};<BR><BR>The implementation that I'm having trouble with is
deleteAccount(). The C++ code looks something like this,<BR><BR>void
BankManager_I::deleteAccount( Account_ptr account )<BR>{<BR>
//<BR> // Here I want to access the "account"
implementation. How do I do it?<BR> // Somehow I will
need to convert Account_ptr to (Account_I *)<BR>
//<BR> Account_I *account_i;<BR>
.....<BR>}<BR><BR>As you can see in the code above, I would like to be able to
get access to the implementation of the "account" object, passed in from the
client. How do I do that? Orbix provides the _deref() function to do
this, and I'm hoping there is a way to do it in omniORB, but so far I'm not
successful. Is this an unusual case for the IDL, ie. you shouldn't allow
clients to pass in an object reference as a parameter?<BR><BR>Thanks again for
any information that you can provide,<BR>Tuyen<BR></BODY></HTML>