Re: Implementation inheritance
- From: ERDI Gergo <cactus cactus rulez org>
- To: gnome-components-list gnome org
- Cc: ORBit/C++ <orbitcpp-list lists sourceforge net>
- Subject: Re: Implementation inheritance
- Date: Sat, 9 Mar 2002 17:16:46 +0100 (CET)
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
`---= cactus cactus rulez org =---'
You are in a twisty maze of little install diskettes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]