Templates at runtime
Christopher Wright
dhasenan at gmail.com
Sat Feb 14 06:13:32 PST 2009
Ary Borenszweig wrote:
> Christopher Wright wrote:
>> Justin wrote:
>>> Is there a way to "find" a classinfo for such a class at runtime?
>>
>> The slow way:
>>
>> foreach (modul; ModuleInfo)
>> foreach (info; modul.localClasses)
>> if (info.name == name) return info;
>> return null;
>
> It doesn't work. It seems only top level classes are included in the
> ModuleInfo.localClasses.
Hm. That's odd. Not terribly surprising, I admit; D's runtime reflection
is lacking.
More information about the Digitalmars-d
mailing list