Getting and using class hierarhy information in runtime

Uranuz neuranuz at gmail.com
Fri Feb 14 07:10:46 PST 2014


> // declare the function so we can access it (as an internal 
> druntime
> // function, thee is no import to provide it, but we can call 
> it anyway)
> extern(C) int _d_isbaseof(ClassInfo oc, ClassInfo c);
>

Maybe implementing such functionality somewhere as standart 
function or method would be a a god idea. It could be a method 
TypeInfo_class object or as stand alone function in phobos 
library. I think that I'm not the first who is searching for 
short and clear way for determining inheritance relation between 
object at runtime.


More information about the Digitalmars-d-learn mailing list