Parsing a string to instantiate classes at runtime

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 28 01:33:08 PST 2016


On 2016-11-27 22:19, Marduk wrote:

> Sure, it's here:
> http://forum.dlang.org/post/xmnnsdiuwyjrhkasyuyg@forum.dlang.org
>
> In that thread they also mention Object.factory, but the documentation
> says that the class must have either no constructor or the default
> constructor, which is not my case.

It's possible to bypass the constructors [1].

[1] 
https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d#L166

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list