]> www.ginac.de Git - cln.git/blob - include/cln/complex_io.h
Ensure that makeinfo ≥ 6.8 checks the @menu structure.
[cln.git] / include / cln / complex_io.h
1 // I/O of complex numbers.
2
3 #ifndef _CL_COMPLEX_IO_H
4 #define _CL_COMPLEX_IO_H
5
6 #include "cln/number_io.h"
7 #include "cln/complex.h"
8
9 namespace cln {
10
11 // Input functions
12
13 extern const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse);
14 extern const cl_N read_complex (std::istream& stream, const cl_read_flags& flags);
15
16 inline std::istream& operator>> (std::istream& stream, cl_N& result)
17 {
18         extern cl_read_flags cl_N_read_flags;
19         result = read_complex(stream,cl_N_read_flags);
20         return stream;
21 }
22
23
24 // Output functions
25
26 // Gibt eine komplexe Zahl aus.
27 // print_complex(stream,z);
28 // > z: komplexe Zahl
29 // > stream: Stream
30 extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z);
31 extern void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z);
32
33 inline void fprint (std::ostream& stream, const cl_N& x)
34 {
35         extern cl_print_flags default_print_flags;
36         print_complex(stream,default_print_flags,x);
37 }
38
39 CL_DEFINE_PRINT_OPERATOR(cl_N)
40
41 }  // namespace cln
42
43 #endif /* _CL_COMPLEX_IO_H */