File: vnl_matlab_print_scalar.h

package info (click to toggle)
insighttoolkit 3.20.1%2Bgit20120521-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 80,652 kB
  • sloc: cpp: 458,133; ansic: 196,223; fortran: 28,000; python: 3,839; tcl: 1,811; sh: 1,184; java: 583; makefile: 430; csh: 220; perl: 193; xml: 20
file content (37 lines) | stat: -rw-r--r-- 1,196 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef vnl_matlab_print_scalar_h_
#define vnl_matlab_print_scalar_h_
/*
  fsm
*/

//:
// \file

#include <vcl_iosfwd.h>
#include <vcl_complex.h>
#include <vnl/vnl_matlab_print_format.h>

//: print real or complex scalar into character buffer.
#define vnl_matlab_print_scalar_declare(T) \
void vnl_matlab_print_scalar(T v, \
                             char *buf, \
                             vnl_matlab_print_format =vnl_matlab_print_format_default)

// Even with a function template we would have to
// forward declare all the specializations anyway.
vnl_matlab_print_scalar_declare(int);
vnl_matlab_print_scalar_declare(unsigned int);
vnl_matlab_print_scalar_declare(float);
vnl_matlab_print_scalar_declare(double);
vnl_matlab_print_scalar_declare(long double);
vnl_matlab_print_scalar_declare(vcl_complex<float>);
vnl_matlab_print_scalar_declare(vcl_complex<double>);
vnl_matlab_print_scalar_declare(vcl_complex<long double>);

//: print scalar to vcl_ostream.
export template <class T>
vcl_ostream &vnl_matlab_print_scalar(vcl_ostream &,
                                     T value,
                                     vnl_matlab_print_format =vnl_matlab_print_format_default);

#endif