A
alexander.stippler
Hi
I try to combine two things, which perhaps aren't compatible at all.
But I at least look for alternatives:
I want to instantiate objects where the type is chosen based on some
input parameter (string). So I thought of the Factory pattern. But the
classes I want to instantiate all use the CRTP pattern, so I can't
choose their 'normal' base class as type for the objects created by the
factory, since for that I would need to know the exact type, and that
is 'hidden' in the string. I hope I expressed the problem
understandable.
Are their any ways to get that functionality?
regards,
Alex
I try to combine two things, which perhaps aren't compatible at all.
But I at least look for alternatives:
I want to instantiate objects where the type is chosen based on some
input parameter (string). So I thought of the Factory pattern. But the
classes I want to instantiate all use the CRTP pattern, so I can't
choose their 'normal' base class as type for the objects created by the
factory, since for that I would need to know the exact type, and that
is 'hidden' in the string. I hope I expressed the problem
understandable.
Are their any ways to get that functionality?
regards,
Alex