Inheritence question

  • Thread starter Thread starter Ron M. Newman
  • Start date Start date
R

Ron M. Newman

Hi Group,

Here's the scenario:

I have a class A with a virtual method X()
I have a class B :deriving from A with an override method X()
I have a class C deriving from B

From an object of class C, I'd like to access the X method on class A. How
do I achieve something like this?

thanks,
Ron
 
"Ron M. Newman" <[email protected]> a écrit dans le message de
news: (e-mail address removed)...

| I have a class A with a virtual method X()
| I have a class B :deriving from A with an override method X()
| I have a class C deriving from B
|
| From an object of class C, I'd like to access the X method on class A. How
| do I achieve something like this?

You don't ! If you have to do this, then your design is wrong :-(

Joanna
 
actually, you're right. I've changed my design.

assembly 1:

class A - raw methods
class B - regulated methods, "internal" scope ones to go raw, regulated
ones go to raw after a check and possible exception

assembly 2:

class C - all calls are referred to regulated methods on class B

thanks !
 
Back
Top