Derived classes? Reflection

Tofu Ninja emmons0 at purdue.edu
Sat Apr 13 09:16:02 PDT 2013


Currently is there a way to get all of the subclasses of a class 
at compile time?
It seems like something that should be possible using traits but 
I can't seems to see how.

Something like

class A{...}
class B:A{...}
class C:A{...}

...

foreach(auto t ; getsubclass(A))
{
    ...
}

Any help would be grateful.
Tofu


More information about the Digitalmars-d-learn mailing list