Getting derived classes

Sean Kelly sean at invisibleduck.org
Fri Oct 17 08:21:39 PDT 2008


Andrei Alexandrescu wrote:
> 
> Anyhow, there's a start with the function static Object.factory(string).
> You give it a string, it gives you a newly-instanced object. So the
> information is there, it just needs exposing.

Much of it is even exposed, just not in a convenient manner.  A list of 
classes is available via ModuleInfo, and ClassInfo provides a means of 
finding the ClassInfo instance of a class by name.  From there it should 
be possible to obtain a list of parent classes, and so one could build a 
hierarchy graph with some work.


Sean



More information about the Digitalmars-d mailing list