N
none
void createMyClass (int a, int b, int c, int d)
{
switch ( a ) {
case 1 :
typedef test::Green ColorType;
switch ( b ) {
case 1 :
typedef test::Water MediumType;
switch ( c ) {
case 1 :
typedef test::Linear InterpolationType;
MyClass<ColorTyper, MediumType, InterpolationType >
myClass;
break;
becomes
void createMyClass (int a, int b, int c, int d)
{
switch ( a ) {
case 1 :
switch ( b ) {
case 1 :
switch ( c ) {
DECLARE_MYCLASS(1, test::Green, test::Water, test::Linear)
DECLARE_MYCLASS(2, test::Green, test::Water, test::Foo)
DECLARE_MYCLASS(3, test::Green, test::Water, test::Bar)
I am back to this problem again. In the above example is DECLARE_MYCLASS and
actual class like:
template<typename A, typename B, typename C>
class DECLARE_MYCLASS {
};
and where does 1,2 and 3 come from? From the above switch all values are 1.