Iterating over modules

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 4 08:34:24 PST 2016


On 05/02/16 4:45 AM, Satoshi wrote:
> Hi,
> is there any way how to iterate over every module/submodule?
>
> I have project like
> Rikarin
> Rikarin/AppKit
> Rikarin/Drawing
> Rikarin/Runtime
> etc.
>
> In every directory, I have package.d file where I include every .d file
> from the dir.
>
> And the think what I want to do is to define UDA's like @Action,
> @Outlet, etc. for methods and generate runtime info for them.
>
> I know I can use something like mixin(generate!...); in every file where
> I used that UDA's, but its not the best idea for me.

I would suggest __traits(allMembers to grab public imports, but it is 
bugged.
There was a fix I had, but it wasn't merged :(


More information about the Digitalmars-d mailing list