Re: I have a problem with D

2016-06-29 Thread Bienlein via Digitalmars-d
You can make use of the visitor pattern. The user that created some subclass then only needs to fill the visitor method with some stuff and that's it. The visitor was already initialized when created which happened before it was handed in to the visitor method of the subclass as a method parame

Re: I have a problem with D

2016-06-28 Thread Stefan via Digitalmars-d
On Tuesday, 28 June 2016 at 04:37:34 UTC, Adam Sansier wrote: Hi, I have designed a class based system that involves self-delegation instead of override. It is similar to event based programming. I have defined an event as a container type that holds functions(or possibly delegates, but the

Re: I have a problem with D

2016-06-27 Thread rikki cattermole via Digitalmars-d
On 28/06/2016 4:37 PM, Adam Sansier wrote: Hi, I have designed a class based system that involves self-delegation instead of override. It is similar to event based programming. I have defined an event as a container type that holds functions(or possibly delegates, but the desire is to avoid th

I have a problem with D

2016-06-27 Thread Adam Sansier via Digitalmars-d
Hi, I have designed a class based system that involves self-delegation instead of override. It is similar to event based programming. I have defined an event as a container type that holds functions(or possibly delegates, but the desire is to avoid them). class Base { alias EventMetho