Class References
Maxim Fomin
maxim at maxim-fomin.ru
Mon Oct 28 08:57:17 PDT 2013
On Monday, 28 October 2013 at 11:22:03 UTC, Jeroen Bollen wrote:
> Is it possible in D to create an enum of class references?
> Something around the lines of:
>
> enum ClassReferences : Interface {
> CLASS1 = &ClassOne,
> CLASS2 = &ClassTwo
> }
You can define class references in module scope and initialize
them in module constructor. This will not help if you want to
have working classes in compile time, but may be useful in
runtime.
More information about the Digitalmars-d-learn
mailing list