Generics Reference Manual


    As explaned in the "Metaclass Definition" section, the metaclasses classes hierarchy modeling and runtime analyser engine is based on simple classes derivation only and does not handle virtual classes derivation i.e. multi parent derivation.

    The following model can not be handled with the generics metaclass services :
        class B : virtual public A ... ;
        class C : virtual public A ... :
        class D : public B, public C ... ;    // can not be handled with metaclasses

    There are two main reasons to justify this choice :

- The c++ language is the only object language that really allows those types of implementations. As demonstrated in this documentation, the Generics services are polymorphic based on and such multi derivations implementations could result in wrong vtable exploitations : pure virtual functions of virtual classes are not dynamically accessible when casted to generic classes and may result in segmentation faults. Generics can not caution those potential memory stack unhandled access due to such implementations...

- The Generics classes types analyses go through the metaclasses hierarchy definitions. Having only one parent class per metaclassed class increases the analyser lookup algorithm performance.