vnl_matlab_print_scalar.h
Go to the documentation of this file.
1 #ifndef vnl_matlab_print_scalar_h_
2 #define vnl_matlab_print_scalar_h_
3 /*
4  fsm
5 */
6 
7 //:
8 // \file
9 
10 #include <iosfwd>
11 #include <complex>
12 #ifdef _MSC_VER
13 # include <vcl_msvc_warnings.h>
14 #endif
16 #include "vnl/vnl_export.h"
17 
18 //: print real or complex scalar into character buffer.
19 #define vnl_matlab_print_scalar_declare(T) \
20 VNL_EXPORT void vnl_matlab_print_scalar(T v, \
21  char *buf, \
22  vnl_matlab_print_format =vnl_matlab_print_format_default)
23 
24 // Even with a function template we would have to
25 // forward declare all the specializations anyway.
31 vnl_matlab_print_scalar_declare(std::complex<float>);
32 vnl_matlab_print_scalar_declare(std::complex<double>);
33 vnl_matlab_print_scalar_declare(std::complex<long double>);
34 
35 //: print scalar to std::ostream.
36 template <class T> VNL_EXPORT
37 std::ostream &vnl_matlab_print_scalar(std::ostream &,
38  T value,
40 
41 #endif
vnl_matlab_print_format
pretty-printing matlab formats.
VNL_EXPORT std::ostream & vnl_matlab_print_scalar(std::ostream &, T value, vnl_matlab_print_format=vnl_matlab_print_format_default)
print scalar to std::ostream.
#define vnl_matlab_print_scalar_declare(T)
print real or complex scalar into character buffer.