I have some codes like these:
process(void*p1,long lNum1,long Type1,void p2,long lNum2,long lType2,Param * toher...)
{
switch(lType1)
case TIA_8U:
switch(lType2)
case TIA_16U:
CMatrix<BYTE>* pIn = (CMatrix<BYTE>*) p1;
CMatrix<USHORT>* pOut = (CMatrix<USHORT>*)p2;
Run<CMatrix<BYTE>, CMatrix<USHORT>,BYTE,USHORT>(pIn,lNum1,pOut,lNum2,otherparams....)
break;
...
}
Now I have a problem: the number of data types is at least 4,so there are at least 16 combinations.When the data type number increases or it has more inputs such as pIn1,pIn2...then there'll be more and more combinations,gold help me!I thought i can make some macros to resolve this,but I failed.Can macro help me? Thank you for any help.
Gary CHine