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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!brunix!brunix!sdm
  3. From: sdm@cs.brown.edu (Scott Meyers)
  4. Subject: Re: Virtual base classes
  5. Message-ID: <1992Dec16.040228.11394@cs.brown.edu>
  6. Keywords: virtual, class
  7. Sender: news@cs.brown.edu
  8. Organization: Brown University Department of Computer Science
  9. References: <rmartin.723768537@thor> <1992Dec8.192759.24081@cs.brown.edu> <445@genie.UUCP>
  10. Date: Wed, 16 Dec 1992 04:02:28 GMT
  11. Lines: 24
  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. | If Kludge is a non-public subclass [derived class] of WellFormed then there
  21. | isn't much point in talking about Kludge redefining WellFormed's virtual
  22. | functions since you can't use a Kludge in a place where a WellFormed is
  23. | expected (i.e., who would ever have hold of a Kludge and send it one of
  24. | WellFormed'd messages [call one of WellFormed'd virtual functions], other than
  25. | a member function of Kludge?).
  26.  
  27. And if a member function of Kludge calls a nonvirtual function of
  28. WellFormed that itself makes calls to virtual functions of WellFormed that
  29. are redefined in Kludge...?
  30.  
  31. Scott
  32.  
  33.  
  34. -------------------------------------------------------------------------------
  35. What do you say to a convicted felon in Providence?  "Hello, Mr. Mayor."
  36.