[omniORB] about summary on interface inheritance
zhang ji
zsfunl@yahoo.com
Tue, 16 Apr 2002 09:02:13 -0700 (PDT)
Hi all,
Thanks for your help on reply "about interface
inheritance". Different answers sent to me, I would
like to make a little summary:)
1.Slava Garelin suggests me to run omniild with
-Wbexample, I tried it and worked. But the generated
code need me to reimplment the method from father
class, it will be a lof of work if there are many
methods need to inherit from father class.
2.Frédéric Prin and Duncan suggest me to use virtual
inheritance to avoid multiple copies of base class
objects.
"
class *_impl : virtual public POA_*
"
3.Luke Deller suggest method 2 and also give another
implementation like below:
"
class father_impl { /* add methods here */ };
class father_i : public POA_father,
public
PortableServer::RefCountServantBase,
public father_impl
{};
class son_impl : public father_i { /* add extra
methods here */};
class son_i : public POA_son,
public
PortableServer::RefCountServantBase,
public son_impl
{};
"
I used method 2 as it is easy to do.
Thanks all for your prompt reply!
Shifeng
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/