SoulForMachine/GLSlayer

Use virtual inheritance for hierarchies that derive from a base class and an interface.

Closed this issue · 1 comments

Interface hierarchies are mirrored by a hierarchy of classes that implement them. Each class in implementation hierarchy derives from it's base implementation class and the corresponding interface, which produces 'diamonds' in the hierarchy. Currently, some macros are used to more easily add function definitions in derived classes which are needed because they are pure virtual in base interface but only map to functions defined in base implementation class. This can be solved better by using virtual inheritance for each base interface.

With virtual inheritance, binary compatibility might be lost between dynamic library and the application using it if they would be compiled with different compilers.