[orbitcpp-list] Re: Implementation inheritance
Status: Beta
Brought to you by:
philipd
|
From: ERDI G. <ca...@ca...> - 2002-03-09 16:16:59
|
On Sat, 9 Mar 2002, ERDI Gergo wrote:
> After playing around with every combination of virtual inheritance, I
> decided to look for 'canonical' answers on the Web. However, the pages
> I've found all boiled down to my initial solution.
Don't you hate it when you send an email and half a minute later you
find the answer by yourself?
So the solution is:
class Hello_impl: public virtual POA_hellomodule::Hello
{
public:
virtual char* helloWorld (const char* greeting) throw (CORBA::SystemException);
};
class Hello2_impl: public virtual POA_hellomodule::Hello2,
public virtual Hello_impl
{
public:
void foo () throw (CORBA::SystemException);
};
I forgot that if Hello_impl inherits POA_hellomodule::Hello only virtually
but you instancize(sp?) a Hello_impl, it will (of course) get a fully
working POA_hellomodule::Hello ancestor.
--
.--= ULLA! =---------------------. `We are not here to give users what
\ http://cactus.rulez.org \ they want' -- RMS, at GUADEC 2001
`---= ca...@ca... =---'
You are in a twisty maze of little install diskettes.
|