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

  1. Newsgroups: comp.lang.c++
  2. From: nikki@trmphrst.demon.co.uk (Nikki Locke)
  3. Path: sparky!uunet!pipex!demon!trmphrst.demon.co.uk!nikki
  4. Subject: Re: Virtual base classes
  5. Reply-To: nikki@trmphrst.demon.co.uk
  6. Distribution: world
  7. X-Mailer: cppnews $Revision: 1.30 $
  8. Organization: Trumphurst Ltd.
  9. Lines: 23
  10. Date: Tue, 15 Dec 1992 20:11:32 +0000
  11. Message-ID: <724475492snx@trmphrst.demon.co.uk>
  12. Sender: usenet@demon.co.uk
  13.  
  14. In article <445@genie.UUCP> roger@genie.UUCP (Roger H. Scott) writes:
  15. > In article <1992Dec8.192759.24081@cs.brown.edu> sdm@cs.brown.edu (Scott Meyers) writes:
  16. > >In article <rmartin.723768537@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  17. > >| ... There is nothing that can be done with private inheritance that cannot
  18. > >| be done, just as simply, with containment.
  19. > >
  20. > >Except for redefining virtual functions and accessing protected members.
  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. Imagine that WellFormed's constructor adds all WellFormeds to some 
  29. Collection of WellFormeds. Notice that all Kludges will also be added to 
  30. this collection. Now imagine some calling some virtual function for all 
  31. WellFormeds in the Collection.
  32.  
  33. -- 
  34. Nikki Locke,Trumphurst Ltd.(PC and Unix consultancy) nikki@trmphrst.demon.co.uk
  35. trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
  36.