home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17992 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  32 lines

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