Quote Originally Posted by wysota View Post
I don't really see a problem in doing this the way I said I made a few plugins in my life (both using and not using the Qt plugin framework) and they always worked as expected in the form I suggested. COM seems to work too, Java implementing interfaces seems to work, other languages as well... I don't really see a problem in creating an implementation of an interface that returns an instance of implementation of another interface...
I did NOT say this was a problem... Your example works pretty fine because both classes are INTERFACES and don't IMPLEMENT any method of their own... They just provide pur virtual methods that pligin implementation MUST subclass... What I pointed out as a source of trouble was non-abstract classes used as interfaces...

Hope this make my explanations a little clearer...