home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!ascent!ascent!eb
- From: eb@ascent.com (Ed Barton)
- Subject: Re: Virtual base classes
- In-reply-to: roger@genie.UUCP's message of 14 Dec 92 00:20:19 GMT
- Message-ID: <EB.92Dec15100043@asdhlasdlasdaskldj.ascent.com>
- Date: 15 Dec 92 10:00:43
- References: <1992Dec3.202705.16646@ucc.su.OZ.AU> <rmartin.723768537@thor>
- <1992Dec8.192759.24081@cs.brown.edu> <445@genie.UUCP>
- Organization: Ascent Technology, Inc., Cambridge Massachusetts
- Lines: 19
-
- In article <445@genie.UUCP> roger@genie.UUCP (Roger H. Scott) writes:
- In article <1992Dec8.192759.24081@cs.brown.edu> sdm@cs.brown.edu (Scott Meyers) writes:
- >In article <rmartin.723768537@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
- >| ... There is nothing that can be done with private inheritance that cannot
- >| be done, just as simply, with containment.
- >
- >Except for redefining virtual functions and accessing protected members.
-
- If Kludge is a non-public subclass [derived class] of WellFormed then there
- isn't much point in talking about Kludge redefining WellFormed's virtual
- functions since you can't use a Kludge in a place where a WellFormed is
- expected (i.e., who would ever have hold of a Kludge and send it one of
- WellFormed'd messages [call one of WellFormed'd virtual functions], other than
- a member function of Kludge?).
-
- What about member functions of WellFormed that call virtual functions
- of WellFormed, expecting that any subclass like Kludge will have
- customized the behavior of those virtual functions as needed?
-
-