00001 #ifndef vnl_matlab_print_scalar_h_ 00002 #define vnl_matlab_print_scalar_h_ 00003 /* 00004 fsm 00005 */ 00006 00007 //: 00008 // \file 00009 00010 #include <vcl_iosfwd.h> 00011 #include <vcl_complex.h> 00012 #include <vnl/vnl_matlab_print_format.h> 00013 00014 //: print real or complex scalar into character buffer. 00015 #define vnl_matlab_print_scalar_declare(T) \ 00016 void vnl_matlab_print_scalar(T v, \ 00017 char *buf, \ 00018 vnl_matlab_print_format =vnl_matlab_print_format_default) 00019 00020 // Even with a function template we would have to 00021 // forward declare all the specializations anyway. 00022 vnl_matlab_print_scalar_declare(int); 00023 vnl_matlab_print_scalar_declare(unsigned int); 00024 vnl_matlab_print_scalar_declare(float); 00025 vnl_matlab_print_scalar_declare(double); 00026 vnl_matlab_print_scalar_declare(long double); 00027 vnl_matlab_print_scalar_declare(vcl_complex<float>); 00028 vnl_matlab_print_scalar_declare(vcl_complex<double>); 00029 vnl_matlab_print_scalar_declare(vcl_complex<long double>); 00030 00031 //: print scalar to vcl_ostream. 00032 export template <class T> 00033 vcl_ostream &vnl_matlab_print_scalar(vcl_ostream &, 00034 T value, 00035 vnl_matlab_print_format =vnl_matlab_print_format_default); 00036 00037 #endif