1
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003, |
|
4 2004, 2005, 2006, 2007 John W. Eaton |
1
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
1
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
1
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_pr_output_h) |
|
25 #define octave_pr_output_h 1 |
1
|
26 |
3503
|
27 #include <iostream> |
1
|
28 |
1651
|
29 #include "oct-cmplx.h" |
|
30 |
4655
|
31 template <typename T> class ArrayN; |
1738
|
32 class ComplexMatrix; |
4513
|
33 class ComplexNDArray; |
1
|
34 class Matrix; |
4513
|
35 class NDArray; |
1738
|
36 class Range; |
3215
|
37 class boolMatrix; |
4513
|
38 class boolNDArray; |
1572
|
39 class charMatrix; |
4513
|
40 class charNDArray; |
3928
|
41 class Cell; |
1
|
42 |
4901
|
43 #include "intNDArray.h" |
|
44 #include "oct-inttypes.h" |
|
45 |
6109
|
46 extern OCTINTERP_API void |
3523
|
47 octave_print_internal (std::ostream& os, double d, |
2920
|
48 bool pr_as_read_syntax = false); |
625
|
49 |
6109
|
50 extern OCTINTERP_API void |
3523
|
51 octave_print_internal (std::ostream& os, const Matrix& m, |
2920
|
52 bool pr_as_read_syntax = false, |
|
53 int extra_indent = 0); |
625
|
54 |
6109
|
55 extern OCTINTERP_API void |
4513
|
56 octave_print_internal (std::ostream& os, const NDArray& nda, |
|
57 bool pr_as_read_syntax = false, |
|
58 int extra_indent = 0); |
|
59 |
6109
|
60 extern OCTINTERP_API void |
3523
|
61 octave_print_internal (std::ostream& os, const Complex& c, |
2920
|
62 bool pr_as_read_syntax = false); |
625
|
63 |
6109
|
64 extern OCTINTERP_API void |
3523
|
65 octave_print_internal (std::ostream& os, const ComplexMatrix& cm, |
2920
|
66 bool pr_as_read_syntax = false, |
|
67 int extra_indent = 0); |
625
|
68 |
6109
|
69 extern OCTINTERP_API void |
4513
|
70 octave_print_internal (std::ostream& os, const ComplexNDArray& nda, |
|
71 bool pr_as_read_syntax = false, |
|
72 int extra_indent = 0); |
|
73 |
6109
|
74 extern OCTINTERP_API void |
3523
|
75 octave_print_internal (std::ostream& os, const Range& r, |
2920
|
76 bool pr_as_read_syntax = false, |
|
77 int extra_indent = 0); |
1
|
78 |
6109
|
79 extern OCTINTERP_API void |
3523
|
80 octave_print_internal (std::ostream& os, const boolMatrix& m, |
3215
|
81 bool pr_as_read_syntax = false, |
|
82 int extra_indent = 0); |
|
83 |
6109
|
84 extern OCTINTERP_API void |
4513
|
85 octave_print_internal (std::ostream& os, const boolNDArray& m, |
|
86 bool pr_as_read_syntax = false, |
|
87 int extra_indent = 0); |
|
88 |
6109
|
89 extern OCTINTERP_API void |
3523
|
90 octave_print_internal (std::ostream& os, const charMatrix& chm, |
2920
|
91 bool pr_as_read_syntax = false, |
3215
|
92 int extra_indent = 0, |
|
93 bool pr_as_string = false); |
1355
|
94 |
6109
|
95 extern OCTINTERP_API void |
4655
|
96 octave_print_internal (std::ostream& os, const charNDArray& nda, |
4513
|
97 bool pr_as_read_syntax = false, |
|
98 int extra_indent = 0, |
|
99 bool pr_as_string = false); |
|
100 |
6109
|
101 extern OCTINTERP_API void |
4925
|
102 octave_print_internal (std::ostream& os, const std::string& s, |
|
103 bool pr_as_read_syntax = false, |
|
104 int extra_indent = 0); |
|
105 |
6109
|
106 extern OCTINTERP_API void |
4655
|
107 octave_print_internal (std::ostream& os, const ArrayN<std::string>& sa, |
|
108 bool pr_as_read_syntax = false, |
|
109 int extra_indent = 0); |
|
110 |
7215
|
111 extern OCTINTERP_API void |
|
112 octave_print_internal (std::ostream& os, const intNDArray<octave_int8>& sa, |
|
113 bool pr_as_read_syntax = false, |
|
114 int extra_indent = 0); |
|
115 |
|
116 extern OCTINTERP_API void |
|
117 octave_print_internal (std::ostream& os, const intNDArray<octave_uint8>& sa, |
|
118 bool pr_as_read_syntax = false, |
|
119 int extra_indent = 0); |
|
120 |
|
121 extern OCTINTERP_API void |
|
122 octave_print_internal (std::ostream& os, const intNDArray<octave_int16>& sa, |
|
123 bool pr_as_read_syntax = false, |
|
124 int extra_indent = 0); |
|
125 |
|
126 extern OCTINTERP_API void |
|
127 octave_print_internal (std::ostream& os, const intNDArray<octave_uint16>& sa, |
|
128 bool pr_as_read_syntax = false, |
|
129 int extra_indent = 0); |
|
130 |
|
131 extern OCTINTERP_API void |
|
132 octave_print_internal (std::ostream& os, const intNDArray<octave_int32>& sa, |
|
133 bool pr_as_read_syntax = false, |
|
134 int extra_indent = 0); |
|
135 |
|
136 extern OCTINTERP_API void |
|
137 octave_print_internal (std::ostream& os, const intNDArray<octave_uint32>& sa, |
|
138 bool pr_as_read_syntax = false, |
|
139 int extra_indent = 0); |
|
140 |
|
141 extern OCTINTERP_API void |
|
142 octave_print_internal (std::ostream& os, const intNDArray<octave_int64>& sa, |
4901
|
143 bool pr_as_read_syntax = false, |
|
144 int extra_indent = 0); |
|
145 |
7215
|
146 extern OCTINTERP_API void |
|
147 octave_print_internal (std::ostream& os, const intNDArray<octave_uint64>& sa, |
|
148 bool pr_as_read_syntax = false, |
|
149 int extra_indent = 0); |
|
150 |
|
151 extern OCTINTERP_API void |
|
152 octave_print_internal (std::ostream& os, const octave_int<int8_t>& sa, |
|
153 bool pr_as_read_syntax = false); |
|
154 |
|
155 extern OCTINTERP_API void |
|
156 octave_print_internal (std::ostream& os, const octave_int<uint8_t>& sa, |
|
157 bool pr_as_read_syntax = false); |
|
158 |
|
159 extern OCTINTERP_API void |
|
160 octave_print_internal (std::ostream& os, const octave_int<int16_t>& sa, |
|
161 bool pr_as_read_syntax = false); |
|
162 |
|
163 extern OCTINTERP_API void |
|
164 octave_print_internal (std::ostream& os, const octave_int<uint16_t>& sa, |
|
165 bool pr_as_read_syntax = false); |
|
166 |
|
167 extern OCTINTERP_API void |
|
168 octave_print_internal (std::ostream& os, const octave_int<int32_t>& sa, |
|
169 bool pr_as_read_syntax = false); |
|
170 |
|
171 extern OCTINTERP_API void |
|
172 octave_print_internal (std::ostream& os, const octave_int<uint32_t>& sa, |
|
173 bool pr_as_read_syntax = false); |
|
174 |
|
175 extern OCTINTERP_API void |
|
176 octave_print_internal (std::ostream& os, const octave_int<int64_t>& sa, |
|
177 bool pr_as_read_syntax = false); |
|
178 |
|
179 extern OCTINTERP_API void |
|
180 octave_print_internal (std::ostream& os, const octave_int<uint64_t>& sa, |
4901
|
181 bool pr_as_read_syntax = false); |
|
182 |
6109
|
183 extern OCTINTERP_API void |
3933
|
184 octave_print_internal (std::ostream& os, const Cell& cell, |
3928
|
185 bool pr_as_read_syntax = false, |
3933
|
186 int extra_indent = 0, |
|
187 bool pr_as_string = false); |
3928
|
188 |
5360
|
189 // TRUE means that the dimensions of empty objects should be printed |
|
190 // like this: x = [](2x0). |
|
191 extern bool Vprint_empty_dimensions; |
|
192 |
5759
|
193 // How many levels of structure elements should we print? |
6153
|
194 extern OCTINTERP_API int Vstruct_levels_to_print; |
5759
|
195 |
1
|
196 #endif |
|
197 |
|
198 /* |
|
199 ;;; Local Variables: *** |
|
200 ;;; mode: C++ *** |
|
201 ;;; End: *** |
|
202 */ |