home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6140 < prev    next >
Encoding:
Text File  |  1992-09-13  |  1.9 KB  |  54 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!cs.utexas.edu!usc!rpi!psinntp!psinntp!afs!michael
  3. From: Michael_Pizolato@afs.com (Michael Pizolato)
  4. Subject: Building a list of class names.
  5. Message-ID: <1992Sep11.183948.2069@afs.com>
  6. Sender: michael@afs.com
  7. Reply-To: Michael_Pizolato@afs.com
  8. Date: Fri, 11 Sep 1992 18:39:48 GMT
  9. Lines: 43
  10.  
  11. I have a family of classes that all descend from a single class, call it class  
  12. A.  As soon as possible after application launch, I need to build a list of the  
  13. names of these classes, so that the list is available to the entire application  
  14. before anything really happens.  For example, I want to wind up with a list of  
  15. strings that looks like this:
  16.  
  17.     "A"  "B"  "C"  "D"  "E"
  18.  
  19. Such a list could come from any number of different class hierarchies.  Here are  
  20. three examples that would produce the above list (if you are reading this in a  
  21. proportional font, you may want to copy it to something mono-spaced so things  
  22. line up properly):
  23.  
  24.    Object -- ... -- A +- B -- C
  25.                       |
  26.                       +- D -- E
  27.  
  28.    Object -- ... -- A -- B -- C +- D
  29.                                 |
  30.                                 +- E
  31.  
  32.    Object -- ... -- A -- D +- E
  33.                            |
  34.                            +- C -- B
  35.  
  36. It is not important that the list be sorted (that's easy enough to do once I  
  37. have a raw list).  I am guaranteed to know that class A exists and is linked  
  38. into the app, but other than that I will know nothing about A or its subclasses.   
  39. For example, I will not know if there are any subclasses of A, nor the names of  
  40. the subclasses of A if they do exist, nor the structure of the inheritance tree  
  41. above or below A, nor if any instances of A or any of its subclasses exist or  
  42. will exist during the run of the app.
  43.  
  44. Any and all ideas will be greatly appreciated.
  45.  
  46. Thanx,
  47. Michael
  48.  
  49. --
  50. Michael_Pizolato@afs.com
  51. ~18 kyu
  52. Q16
  53. NeXTMail appreciated
  54.