home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / object / 2949 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.2 KB

  1. Xref: sparky comp.object:2949 comp.lang.c++:11238 comp.std.c++:898
  2. Newsgroups: comp.object,comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  4. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  5. Subject: Re: Re^2: run-time type checking (was: Re: Covariant Types in Derived Classes)
  6. Message-ID: <1992Jul21.153405.23436@ucc.su.OZ.AU>
  7. Sender: news@ucc.su.OZ.AU
  8. Nntp-Posting-Host: extro.ucc.su.oz.au
  9. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  10. References: <1992Jul17.231700.17298@cadsun.corp.mot.com> <694@data.rain.com> <14feqsINNt9d@early-bird.think.com>
  11. Date: Tue, 21 Jul 1992 15:34:05 GMT
  12. Lines: 35
  13.  
  14. In article <14feqsINNt9d@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
  15. >In article <694@data.rain.com> kend@data.rain.com (Ken Dickey) writes:
  16. >>shang@corp.mot.com (David (Lujun) Shang) writes:
  17. >>>Then, once you put an object into a heterogeneous collection, the
  18. >>> object will lose its specific characteristics forever.
  19. >>An object cannot be a member of more than 1 set ???  8^)
  20. >
  21. >Shang didn't really describe it well.  The collection is presumably a set
  22. >of pointers or references, and it's those pointers/references that lose
  23. >their more specific characteristics; static type checking limits you to
  24. >treating them as objects of the class defined by the collection.  The
  25. >original objects to which they refer still retain all their
  26. >characteristics, though.  In particular, virtual function calls will use
  27. >the overriding definitions in derived classes.  But members that are only
  28. >declared and defined in derived classes cannot be accessed through the
  29. >collection.
  30. >
  31. >If an object is referenced by more than one set, each set will define which
  32. >aspects of the object can be accessed.
  33.  
  34.     A mechanism facilitated by multiply inheriting from various
  35. abstract bases: one for each set you want the object to be in.
  36.  
  37. >-- 
  38. >Barry Margolin
  39. >System Manager, Thinking Machines Corp.
  40. >
  41. >barmar@think.com          {uunet,harvard}!think!barmar
  42.  
  43.  
  44. -- 
  45. ;----------------------------------------------------------------------
  46.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  47.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  48. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  49.