Implement Interface dynamically

2014-07-14 Thread Frustrated via Digitalmars-d-learn
Is there a way to take an interface and implement it generically? e.g., All functions are implemented either as throw and/or return defaults and properties are implemented as getter/setters. This is for mocking up so I a simple way to create a class based off only the interface. Essentially

Re: Implement Interface dynamically

2014-07-14 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 14 July 2014 at 14:45:01 UTC, Frustrated wrote: Is there a way to take an interface and implement it generically? e.g., All functions are implemented either as throw and/or return defaults and properties are implemented as getter/setters. This is for mocking up so I a simple way

Re: Implement Interface dynamically

2014-07-14 Thread Gary Willoughby via Digitalmars-d-learn
There's some handy refection stuff in there too: https://github.com/nomad-software/dunit/blob/master/source/dunit/reflection.d

Re: Implement Interface dynamically

2014-07-14 Thread Dicebot via Digitalmars-d-learn
http://dlang.org/phobos/std_typecons.html#.BlackHole http://dlang.org/phobos/std_typecons.html#.WhiteHole http://dlang.org/phobos/std_typecons.html#.AutoImplement ?