Finding all the interfaces and their inheritance relationships at runtime
bauss via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 3 13:45:19 PDT 2017
On Monday, 3 July 2017 at 13:54:42 UTC, Jean-Louis Leroy wrote:
> I know how to find all the classes:
>
> foreach (mod; ModuleInfo) {
> foreach (c; mod.localClasses) {
> // use c.base to construct inheritance graph
> }
> }
>
> Can I do the same with all the interfaces? Looking at object.d
> gives no clue...
Is there a reason you need to do it with runtime and can't use
__traits?
More information about the Digitalmars-d-learn
mailing list