/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyright(C) 2004-2016 \/)\/ * * Visual Computing Lab /\/| * * ISTI - Italian National Research Council | * * \ * * All rights reserved. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * for more details. * * * ****************************************************************************/ #ifndef __VCG_DERIVATION_CHAIN #define __VCG_DERIVATION_CHAIN namespace vcg{ /*------------------------------------------------------------------*/ // Metaprogramming Core template < typename T=int> class DefaultDeriver : public T {}; template < class Base, template class A> class Arity1: public A { }; template < class Base, template class A, template class B> class Arity2: public B > {}; template < class Base, template class A, template class B, template class C > class Arity3: public C > {}; template < class Base, template class A, template class B, template class C, template class D> class Arity4: public D > {}; template < class Base, template class A, template class B, template class C, template class D, template class E > class Arity5: public E > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F > class Arity6: public F > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G> class Arity7: public G > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H> class Arity8: public H > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H, template class I> class Arity9: public I > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H, template class I, template class J> class Arity10: public J > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H, template class I, template class J, template class K> class Arity11: public K > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H, template class I, template class J, template class K, template class L> class Arity12: public L > {}; template < class Base, template class A, template class B, template class C, template class D, template class E, template class F, template class G, template class H, template class I, template class J, template class K, template class L, template class M > class Arity13: public L > {}; // chain with 2 template arguments on the derivers template < class Base, class TA, template class A > class MArity1: public A< Base, TA > { }; template < class Base, class TA, template class A, class TB, template class B> class MArity2: public B< MArity1,TB > {}; template < class Base, class TA, template class A, class TB, template class B, class TC, template class C > class MArity3: public C,TC > {}; template < class Base, class TA, template class A, class TB, template class B, class TC, template class C, class TD, template class D> class MArity4: public D,TD > {}; template < class Base, class TA, template class A, class TB, template class B, class TC, template class C, class TD, template class D, class TE, template class E> class MArity5: public E, TE> {}; class DumClass {}; }// end namespace vcg #endif