- {
- case 0:
- sz = PrintCurveData((unsigned short*)(curve_data), num_points);
- break;
- case 1:
- sz = PrintCurveData((signed short*)(curve_data), num_points);
- break;
- case 2:
- sz = PrintCurveData((float*)(curve_data), num_points);
- break;
- case 3:
- sz = PrintCurveData((double*)(curve_data), num_points);
- break;
- case 4:
- sz = PrintCurveData((signed long*)(curve_data), num_points);
- break;
- default:
- std::cerr << "Error don't know the type: " << data_rep_str << std::endl;
- delete f;
- return 1;
- }
+ {
+ case 0:
+ sz = PrintCurveData((DataRepToType<0>::Type*)(curve_data), num_points);
+ sizeofdatarep = sizeof( DataRepToType<0>::Type );
+ break;
+ case 1:
+ sz = PrintCurveData((DataRepToType<1>::Type*)(curve_data), num_points);
+ sizeofdatarep = sizeof( DataRepToType<1>::Type );
+ break;
+ case 2:
+ sz = PrintCurveData((DataRepToType<2>::Type*)(curve_data), num_points);
+ sizeofdatarep = sizeof( DataRepToType<2>::Type );
+ break;
+ case 3:
+ sz = PrintCurveData((DataRepToType<3>::Type*)(curve_data), num_points);
+ sizeofdatarep = sizeof( DataRepToType<3>::Type );
+ break;
+ case 4:
+ sz = PrintCurveData((DataRepToType<4>::Type*)(curve_data), num_points);
+ sizeofdatarep = sizeof( DataRepToType<4>::Type );
+ break;
+ default:
+ std::cerr << "Error don't know the type: " << data_rep_str << std::endl;
+ f->Delete();
+ return 1;
+ }