Nested class defined in another file

Bruno Deligny bruno.deligny at gmail.com
Mon Jun 3 15:20:23 PDT 2013


On Monday, 3 June 2013 at 22:07:15 UTC, bearophile wrote:
> Bruno Deligny:
>
>> I want to separate nested classes in multiple files to 
>> increase readability but i need to keep the access to parent 
>> members.
>> Is it possible?
>
> This is a solution, but it's not nice:
>
> mixin(import("filename1"));
> mixin(import("filename2"));
> ...
>
> Why do you need so much/so many nested classes?
>
> Bye,
> bearophile

I only have 5 classes nested into one but it sufficient to make 
the code difficult to read.

I began to separate them by hand by passing a parent reference 
but it's ugly because i need to make the parent members 
accessible in public to have acces. Is there any "friend" like in 
C++ to keep them private to others?


More information about the Digitalmars-d-learn mailing list