home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!brunix!brunix!sdm
- From: sdm@cs.brown.edu (Scott Meyers)
- Subject: Re: Virtual base classes
- Message-ID: <1992Dec16.040228.11394@cs.brown.edu>
- Keywords: virtual, class
- Sender: news@cs.brown.edu
- Organization: Brown University Department of Computer Science
- References: <rmartin.723768537@thor> <1992Dec8.192759.24081@cs.brown.edu> <445@genie.UUCP>
- Date: Wed, 16 Dec 1992 04:02:28 GMT
- Lines: 24
-
- 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?).
-
- And if a member function of Kludge calls a nonvirtual function of
- WellFormed that itself makes calls to virtual functions of WellFormed that
- are redefined in Kludge...?
-
- Scott
-
-
- -------------------------------------------------------------------------------
- What do you say to a convicted felon in Providence? "Hello, Mr. Mayor."
-