home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!psinntp!psinntp!afs!michael
- From: Michael_Pizolato@afs.com (Michael Pizolato)
- Subject: Building a list of class names.
- Message-ID: <1992Sep11.183948.2069@afs.com>
- Sender: michael@afs.com
- Reply-To: Michael_Pizolato@afs.com
- Date: Fri, 11 Sep 1992 18:39:48 GMT
- Lines: 43
-
- I have a family of classes that all descend from a single class, call it class
- A. As soon as possible after application launch, I need to build a list of the
- names of these classes, so that the list is available to the entire application
- before anything really happens. For example, I want to wind up with a list of
- strings that looks like this:
-
- "A" "B" "C" "D" "E"
-
- Such a list could come from any number of different class hierarchies. Here are
- three examples that would produce the above list (if you are reading this in a
- proportional font, you may want to copy it to something mono-spaced so things
- line up properly):
-
- Object -- ... -- A +- B -- C
- |
- +- D -- E
-
- Object -- ... -- A -- B -- C +- D
- |
- +- E
-
- Object -- ... -- A -- D +- E
- |
- +- C -- B
-
- It is not important that the list be sorted (that's easy enough to do once I
- have a raw list). I am guaranteed to know that class A exists and is linked
- into the app, but other than that I will know nothing about A or its subclasses.
- For example, I will not know if there are any subclasses of A, nor the names of
- the subclasses of A if they do exist, nor the structure of the inheritance tree
- above or below A, nor if any instances of A or any of its subclasses exist or
- will exist during the run of the app.
-
- Any and all ideas will be greatly appreciated.
-
- Thanx,
- Michael
-
- --
- Michael_Pizolato@afs.com
- ~18 kyu
- Q16
- NeXTMail appreciated
-