Runtime introspection, or how to get class members at runtime Fin D

Arafel er.krali at gmail.com
Thu Jun 7 12:32:26 UTC 2018


Thanks for all the answers!

Is it possible to register, say, a base class, and have all the 
subclasses then registered automatically?

My idea would be to make it as transparent as possible for the plugin 
implementation, and also not having to depend on it.

A.


> 
> There is a library that creates reflection metadata for you. [1]
> 
> It seems a bit outdated and has some not-that-obvious compilation 
> errors(for example getting ctor and callling it with runtime known type, 
> or some other non template stuff), but other than that seems to be 
> working (note that I didn't thorougly tested it, but its unittests 
> succeeds on DMD 2.080 for both Windows x86 mscoff & x64 )
> 
> [1] https://code.dlang.org/packages/witchcraft
> 



More information about the Digitalmars-d-learn mailing list