Mercurial > octave-nkf
annotate src/ov-base.h @ 9329:67fc970dad7d
improve indexed assignment using indexed numel
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 10 Jun 2009 11:31:58 +0200 |
parents | 23af5910e5f5 |
children | e08d72bb988e |
rev | line source |
---|---|
2376 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, |
8920 | 4 2006, 2007, 2008, 2009 John W. Eaton |
2376 | 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. | |
2376 | 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/>. | |
2376 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_base_value_h) | |
25 #define octave_base_value_h 1 | |
26 | |
27 #include <cstdlib> | |
28 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
29 #include <iosfwd> |
5759 | 30 #include <list> |
2376 | 31 #include <string> |
32 | |
5759 | 33 #include "Range.h" |
5828 | 34 #include "data-conv.h" |
5900 | 35 #include "mxarray.h" |
2376 | 36 #include "mx-base.h" |
37 #include "str-vec.h" | |
38 | |
39 #include "error.h" | |
8676 | 40 #include "oct-hdf5.h" |
2376 | 41 |
3351 | 42 class Cell; |
2376 | 43 class Octave_map; |
5759 | 44 class octave_value; |
2376 | 45 class octave_value_list; |
5759 | 46 class octave_stream; |
47 class octave_function; | |
48 class octave_user_function; | |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
49 class octave_user_script; |
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
50 class octave_user_code; |
5759 | 51 class octave_fcn_handle; |
52 class octave_fcn_inline; | |
53 class octave_value_list; | |
54 class octave_lvalue; | |
2376 | 55 |
56 class tree_walker; | |
57 | |
5759 | 58 // T_ID is the type id of struct objects, set by register_type(). |
59 // T_NAME is the type name of struct objects. | |
7067 | 60 |
5759 | 61 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \ |
7066 | 62 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG) |
5759 | 63 |
64 #define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA \ | |
65 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual) | |
66 | |
67 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL) \ | |
68 public: \ | |
69 VIRTUAL int type_id (void) const { return t_id; } \ | |
70 VIRTUAL std::string type_name (void) const { return t_name; } \ | |
71 VIRTUAL std::string class_name (void) const { return c_name; } \ | |
72 static int static_type_id (void) { return t_id; } \ | |
73 static std::string static_type_name (void) { return t_name; } \ | |
74 static std::string static_class_name (void) { return c_name; } \ | |
75 static void register_type (void); \ | |
76 \ | |
77 private: \ | |
78 static int t_id; \ | |
79 static const std::string t_name; \ | |
80 static const std::string c_name; | |
81 | |
82 | |
83 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \ | |
84 int t::t_id (-1); \ | |
85 const std::string t::t_name (n); \ | |
86 const std::string t::c_name (c); \ | |
87 void t::register_type (void) \ | |
88 { \ | |
89 t_id = octave_value_typeinfo::register_type (t::t_name, \ | |
90 t::c_name, \ | |
91 octave_value (new t ())); \ | |
92 } | |
93 | |
2477 | 94 // A base value type, so that derived types only have to redefine what |
95 // they need (if they are derived from octave_base_value instead of | |
96 // octave_value). | |
2376 | 97 |
98 class | |
6109 | 99 OCTINTERP_API |
5759 | 100 octave_base_value |
2376 | 101 { |
102 public: | |
103 | |
5759 | 104 typedef octave_base_value * (*type_conv_fcn) (const octave_base_value&); |
105 | |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
106 // type conversion, including result type information |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
107 class type_conv_info |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
108 { |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
109 public: |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
110 type_conv_info (type_conv_fcn f = 0, int t = -1) : _fcn (f), _type_id (t) { } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
111 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
112 operator type_conv_fcn (void) const { return _fcn; } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
113 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
114 octave_base_value * operator () (const octave_base_value &v) const |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
115 { return (*_fcn) (v); } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
116 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
117 int type_id (void) const { return _type_id; } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
118 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
119 private: |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
120 type_conv_fcn _fcn; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
121 int _type_id; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
122 }; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
123 |
5759 | 124 friend class octave_value; |
2376 | 125 |
5759 | 126 octave_base_value (void) : count (1) { } |
127 | |
128 octave_base_value (const octave_base_value&) { } | |
2376 | 129 |
5759 | 130 virtual ~octave_base_value (void) { } |
131 | |
132 virtual octave_base_value * | |
133 clone (void) const { return new octave_base_value (*this); } | |
2376 | 134 |
5759 | 135 virtual octave_base_value * |
136 empty_clone (void) const { return new octave_base_value (); } | |
2376 | 137 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
138 virtual type_conv_info |
5759 | 139 numeric_conversion_function (void) const |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
140 { return type_conv_info (); } |
2410 | 141 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
142 virtual type_conv_info |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
143 numeric_demotion_function (void) const |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
144 { return type_conv_info (); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
145 |
5759 | 146 virtual octave_value squeeze (void) const; |
147 | |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
148 virtual octave_value full_value (void) const; |
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
149 |
5759 | 150 virtual octave_base_value *try_narrowing_conversion (void) { return 0; } |
4532 | 151 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
152 virtual void maybe_economize (void) { } |
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
153 |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
154 virtual Matrix size (void); |
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
155 |
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
156 virtual octave_idx_type numel (const octave_value_list&); |
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
157 |
5759 | 158 virtual octave_value |
159 subsref (const std::string& type, | |
160 const std::list<octave_value_list>& idx); | |
3933 | 161 |
5759 | 162 virtual octave_value_list |
163 subsref (const std::string& type, | |
164 const std::list<octave_value_list>& idx, | |
165 int nargout); | |
3933 | 166 |
5759 | 167 virtual octave_value |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
168 subsref (const std::string& type, |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
169 const std::list<octave_value_list>& idx, |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
170 bool auto_add); |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
171 |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
172 virtual octave_value |
5885 | 173 do_index_op (const octave_value_list& idx, bool resize_ok = false); |
2974 | 174 |
5759 | 175 virtual octave_value_list |
3544 | 176 do_multi_index_op (int nargout, const octave_value_list& idx); |
2376 | 177 |
9147
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
178 virtual void assign (const std::string&, const octave_value&) { } |
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
179 |
5759 | 180 virtual octave_value |
181 subsasgn (const std::string& type, | |
182 const std::list<octave_value_list>& idx, | |
183 const octave_value& rhs); | |
2376 | 184 |
5759 | 185 virtual idx_vector index_vector (void) const; |
2376 | 186 |
5759 | 187 virtual dim_vector dims (void) const { return dim_vector (-1, -1); } |
4559 | 188 |
5759 | 189 octave_idx_type rows (void) const |
190 { | |
191 dim_vector dv = dims (); | |
5164 | 192 |
5759 | 193 return (dv.length () > 0) ? dv(0) : -1; |
194 } | |
4791 | 195 |
5759 | 196 octave_idx_type columns (void) const |
197 { | |
198 dim_vector dv = dims (); | |
5602 | 199 |
5759 | 200 return (dv.length () > 1) ? dv(1) : -1; |
201 } | |
5604 | 202 |
5759 | 203 virtual int ndims (void) const; |
4567 | 204 |
5759 | 205 virtual octave_idx_type numel (void) const { return dims ().numel (); } |
4593 | 206 |
5759 | 207 virtual octave_idx_type capacity (void) const { return numel (); } |
208 | |
209 virtual size_t byte_size (void) const { return 0; } | |
4915 | 210 |
5759 | 211 virtual octave_idx_type nnz (void) const; |
2376 | 212 |
5759 | 213 virtual octave_idx_type nzmax (void) const; |
214 | |
5900 | 215 virtual octave_idx_type nfields (void) const; |
216 | |
5759 | 217 virtual octave_value reshape (const dim_vector&) const; |
3351 | 218 |
5759 | 219 virtual octave_value permute (const Array<int>& vec, bool = false) const; |
2376 | 220 |
5759 | 221 virtual octave_value resize (const dim_vector&, bool fill = false) const; |
2376 | 222 |
5785 | 223 virtual MatrixType matrix_type (void) const; |
224 | |
225 virtual MatrixType matrix_type (const MatrixType& typ) const; | |
226 | |
5759 | 227 virtual bool is_defined (void) const { return false; } |
4505 | 228 |
5759 | 229 bool is_empty (void) const { return numel () == 0; } |
2376 | 230 |
5759 | 231 virtual bool is_cell (void) const { return false; } |
2376 | 232 |
6116 | 233 virtual bool is_cellstr (void) const { return false; } |
234 | |
5759 | 235 virtual bool is_real_scalar (void) const { return false; } |
4587 | 236 |
5759 | 237 virtual bool is_real_matrix (void) const { return false; } |
238 | |
239 virtual bool is_real_nd_array (void) const { return false; } | |
2376 | 240 |
5759 | 241 virtual bool is_complex_scalar (void) const { return false; } |
2376 | 242 |
5759 | 243 virtual bool is_complex_matrix (void) const { return false; } |
244 | |
5881 | 245 virtual bool is_bool_scalar (void) const { return false; } |
246 | |
5759 | 247 virtual bool is_bool_matrix (void) const { return false; } |
5279 | 248 |
5759 | 249 virtual bool is_char_matrix (void) const { return false; } |
2376 | 250 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
251 virtual bool is_diag_matrix (void) const { return false; } |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
252 |
8371
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8366
diff
changeset
|
253 virtual bool is_perm_matrix (void) const { return false; } |
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8366
diff
changeset
|
254 |
5759 | 255 virtual bool is_string (void) const { return false; } |
2376 | 256 |
5759 | 257 virtual bool is_sq_string (void) const { return false; } |
4643 | 258 |
5759 | 259 virtual bool is_range (void) const { return false; } |
3977 | 260 |
5759 | 261 virtual bool is_map (void) const { return false; } |
262 | |
7336 | 263 virtual bool is_object (void) const { return false; } |
264 | |
5759 | 265 virtual bool is_cs_list (void) const { return false; } |
2376 | 266 |
5759 | 267 virtual bool is_list (void) const { return false; } |
268 | |
269 virtual bool is_magic_colon (void) const { return false; } | |
2376 | 270 |
5759 | 271 virtual bool is_all_va_args (void) const { return false; } |
2376 | 272 |
5759 | 273 virtual octave_value all (int = 0) const; |
274 | |
275 virtual octave_value any (int = 0) const; | |
2376 | 276 |
5895 | 277 virtual bool is_double_type (void) const { return false; } |
278 | |
279 virtual bool is_single_type (void) const { return false; } | |
280 | |
7576 | 281 virtual bool is_float_type (void) const { return false; } |
282 | |
5895 | 283 virtual bool is_int8_type (void) const { return false; } |
284 | |
285 virtual bool is_int16_type (void) const { return false; } | |
286 | |
287 virtual bool is_int32_type (void) const { return false; } | |
288 | |
289 virtual bool is_int64_type (void) const { return false; } | |
290 | |
291 virtual bool is_uint8_type (void) const { return false; } | |
292 | |
293 virtual bool is_uint16_type (void) const { return false; } | |
294 | |
295 virtual bool is_uint32_type (void) const { return false; } | |
296 | |
297 virtual bool is_uint64_type (void) const { return false; } | |
298 | |
5759 | 299 virtual bool is_bool_type (void) const { return false; } |
3209 | 300 |
6223 | 301 virtual bool is_integer_type (void) const { return false; } |
302 | |
5759 | 303 virtual bool is_real_type (void) const { return false; } |
2376 | 304 |
5759 | 305 virtual bool is_complex_type (void) const { return false; } |
2376 | 306 |
307 // Would be nice to get rid of the next four functions: | |
308 | |
5759 | 309 virtual bool is_scalar_type (void) const { return false; } |
2376 | 310 |
5759 | 311 virtual bool is_matrix_type (void) const { return false; } |
2376 | 312 |
5759 | 313 virtual bool is_numeric_type (void) const { return false; } |
2376 | 314 |
5759 | 315 virtual bool is_sparse_type (void) const { return false; } |
5631 | 316 |
5759 | 317 virtual bool is_true (void) const { return false; } |
318 | |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
7885
diff
changeset
|
319 virtual bool is_null_value (void) const { return false; } |
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
7885
diff
changeset
|
320 |
5759 | 321 virtual bool is_constant (void) const { return false; } |
2376 | 322 |
5759 | 323 virtual bool is_function_handle (void) const { return false; } |
2376 | 324 |
5759 | 325 virtual bool is_inline_function (void) const { return false; } |
2974 | 326 |
5759 | 327 virtual bool is_function (void) const { return false; } |
4954 | 328 |
7336 | 329 virtual bool is_user_script (void) const { return false; } |
330 | |
331 virtual bool is_user_function (void) const { return false; } | |
332 | |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
333 virtual bool is_user_code (void) const { return false; } |
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
334 |
5759 | 335 virtual bool is_builtin_function (void) const { return false; } |
2974 | 336 |
5759 | 337 virtual bool is_dld_function (void) const { return false; } |
3325 | 338 |
5864 | 339 virtual bool is_mex_function (void) const { return false; } |
340 | |
7876
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
341 virtual void erase_subfunctions (void) { } |
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
342 |
5759 | 343 virtual short int short_value (bool = false, bool = false) const; |
4254 | 344 |
5759 | 345 virtual unsigned short int ushort_value (bool = false, bool = false) const; |
4254 | 346 |
5759 | 347 virtual int int_value (bool = false, bool = false) const; |
3202 | 348 |
5759 | 349 virtual unsigned int uint_value (bool = false, bool = false) const; |
4254 | 350 |
5759 | 351 virtual int nint_value (bool = false) const; |
3202 | 352 |
5759 | 353 virtual long int long_value (bool = false, bool = false) const; |
4254 | 354 |
5759 | 355 virtual unsigned long int ulong_value (bool = false, bool = false) const; |
4254 | 356 |
5759 | 357 virtual double double_value (bool = false) const; |
2376 | 358 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
359 virtual float float_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
360 |
5759 | 361 virtual double scalar_value (bool frc_str_conv = false) const |
3145 | 362 { return double_value (frc_str_conv); } |
2376 | 363 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
364 virtual float float_scalar_value (bool frc_str_conv = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
365 { return float_value (frc_str_conv); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
366 |
5759 | 367 virtual Cell cell_value (void) const; |
3351 | 368 |
5759 | 369 virtual Matrix matrix_value (bool = false) const; |
3145 | 370 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
371 virtual FloatMatrix float_matrix_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
372 |
5759 | 373 virtual NDArray array_value (bool = false) const; |
4505 | 374 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
375 virtual FloatNDArray float_array_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
376 |
5759 | 377 virtual Complex complex_value (bool = false) const; |
2376 | 378 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
379 virtual FloatComplex float_complex_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
380 |
5759 | 381 virtual ComplexMatrix complex_matrix_value (bool = false) const; |
2376 | 382 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
383 virtual FloatComplexMatrix float_complex_matrix_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
384 |
5759 | 385 virtual ComplexNDArray complex_array_value (bool = false) const; |
4550 | 386 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
387 virtual FloatComplexNDArray float_complex_array_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
388 |
5943 | 389 virtual bool bool_value (bool = false) const; |
4550 | 390 |
5943 | 391 virtual boolMatrix bool_matrix_value (bool = false) const; |
4550 | 392 |
5943 | 393 virtual boolNDArray bool_array_value (bool = false) const; |
4550 | 394 |
5759 | 395 virtual charMatrix char_matrix_value (bool force = false) const; |
396 | |
397 virtual charNDArray char_array_value (bool = false) const; | |
2376 | 398 |
5759 | 399 virtual SparseMatrix sparse_matrix_value (bool = false) const; |
4550 | 400 |
5759 | 401 virtual SparseComplexMatrix sparse_complex_matrix_value (bool = false) const; |
5164 | 402 |
5759 | 403 virtual SparseBoolMatrix sparse_bool_matrix_value (bool = false) const; |
5164 | 404 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
405 virtual DiagMatrix diag_matrix_value (bool = false) const; |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
406 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
407 virtual FloatDiagMatrix float_diag_matrix_value (bool = false) const; |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
408 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
409 virtual ComplexDiagMatrix complex_diag_matrix_value (bool = false) const; |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
410 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
411 virtual FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const; |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
412 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
413 virtual PermMatrix perm_matrix_value (void) const; |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
414 |
5759 | 415 virtual octave_int8 int8_scalar_value (void) const; |
5164 | 416 |
5759 | 417 virtual octave_int16 int16_scalar_value (void) const; |
4910 | 418 |
5759 | 419 virtual octave_int32 int32_scalar_value (void) const; |
420 | |
421 virtual octave_int64 int64_scalar_value (void) const; | |
4910 | 422 |
5759 | 423 virtual octave_uint8 uint8_scalar_value (void) const; |
4910 | 424 |
5759 | 425 virtual octave_uint16 uint16_scalar_value (void) const; |
4910 | 426 |
5759 | 427 virtual octave_uint32 uint32_scalar_value (void) const; |
4910 | 428 |
5759 | 429 virtual octave_uint64 uint64_scalar_value (void) const; |
4910 | 430 |
5759 | 431 virtual int8NDArray int8_array_value (void) const; |
4910 | 432 |
5759 | 433 virtual int16NDArray int16_array_value (void) const; |
4910 | 434 |
5759 | 435 virtual int32NDArray int32_array_value (void) const; |
4906 | 436 |
5759 | 437 virtual int64NDArray int64_array_value (void) const; |
4906 | 438 |
5759 | 439 virtual uint8NDArray uint8_array_value (void) const; |
4906 | 440 |
5759 | 441 virtual uint16NDArray uint16_array_value (void) const; |
4906 | 442 |
5759 | 443 virtual uint32NDArray uint32_array_value (void) const; |
4906 | 444 |
5759 | 445 virtual uint64NDArray uint64_array_value (void) const; |
4906 | 446 |
5759 | 447 virtual string_vector all_strings (bool pad = false) const; |
4906 | 448 |
5759 | 449 virtual std::string string_value (bool force = false) const; |
4906 | 450 |
8732 | 451 virtual Array<std::string> cellstr_value (void) const; |
452 | |
5759 | 453 virtual Range range_value (void) const; |
2376 | 454 |
5759 | 455 virtual Octave_map map_value (void) const; |
2376 | 456 |
5759 | 457 virtual string_vector map_keys (void) const; |
2376 | 458 |
9151 | 459 virtual size_t nparents (void) const; |
460 | |
461 virtual std::list<std::string> parent_class_name_list (void) const; | |
462 | |
463 virtual string_vector parent_class_names (void) const; | |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
464 |
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
465 virtual octave_base_value *find_parent_class (const std::string&) |
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
466 { return 0; } |
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
467 |
5759 | 468 virtual octave_function *function_value (bool silent = false); |
3933 | 469 |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
470 virtual const octave_function *function_value (bool silent = false) const; |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
471 |
5759 | 472 virtual octave_user_function *user_function_value (bool silent = false); |
4645 | 473 |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
474 virtual octave_user_script *user_script_value (bool silent = false); |
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
475 |
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
476 virtual octave_user_code *user_code_value (bool silent = false); |
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
477 |
5759 | 478 virtual octave_fcn_handle *fcn_handle_value (bool silent = false); |
4643 | 479 |
5759 | 480 virtual octave_fcn_inline *fcn_inline_value (bool silent = false); |
2974 | 481 |
5759 | 482 virtual octave_value_list list_value (void) const; |
4343 | 483 |
5759 | 484 virtual octave_value convert_to_str (bool pad = false, bool force = false, |
485 char type = '"') const; | |
486 virtual octave_value | |
487 convert_to_str_internal (bool pad, bool force, char type) const; | |
4933 | 488 |
5759 | 489 virtual void convert_to_row_or_column_vector (void); |
2882 | 490 |
5759 | 491 virtual bool print_as_scalar (void) const { return false; } |
2376 | 492 |
5759 | 493 virtual void print (std::ostream& os, bool pr_as_read_syntax = false) const; |
2376 | 494 |
5759 | 495 virtual void |
496 print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; | |
4604 | 497 |
5759 | 498 virtual bool |
499 print_name_tag (std::ostream& os, const std::string& name) const; | |
2901 | 500 |
5759 | 501 virtual void |
502 print_with_name (std::ostream& output_buf, const std::string& name, | |
503 bool print_padding = true) const; | |
2376 | 504 |
5759 | 505 virtual void print_info (std::ostream& os, const std::string& prefix) const; |
3933 | 506 |
6974 | 507 virtual bool save_ascii (std::ostream& os); |
4687 | 508 |
5759 | 509 virtual bool load_ascii (std::istream& is); |
4687 | 510 |
5759 | 511 virtual bool save_binary (std::ostream& os, bool& save_as_floats); |
4687 | 512 |
5759 | 513 virtual bool load_binary (std::istream& is, bool swap, |
514 oct_mach_info::float_format fmt); | |
4687 | 515 |
516 #if defined (HAVE_HDF5) | |
5759 | 517 virtual bool |
518 save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); | |
4687 | 519 |
5759 | 520 virtual bool |
521 load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); | |
4687 | 522 #endif |
523 | |
5759 | 524 virtual int |
525 write (octave_stream& os, int block_size, | |
526 oct_data_conv::data_type output_type, int skip, | |
527 oct_mach_info::float_format flt_fmt) const; | |
528 | |
5900 | 529 virtual void *mex_get_data (void) const { return 0; } |
530 | |
531 virtual octave_idx_type *mex_get_ir (void) const { return 0; } | |
532 | |
533 virtual octave_idx_type *mex_get_jc (void) const { return 0; } | |
534 | |
535 virtual mxArray *as_mxArray (void) const; | |
536 | |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
537 virtual octave_value diag (octave_idx_type k = 0) const; |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
538 |
7433 | 539 virtual octave_value sort (octave_idx_type dim = 0, |
7463
2467639bd8c0
eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
540 sortmode mode = ASCENDING) const; |
7433 | 541 virtual octave_value sort (Array<octave_idx_type> &sidx, |
542 octave_idx_type dim = 0, | |
7463
2467639bd8c0
eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
543 sortmode mode = ASCENDING) const; |
7433 | 544 |
8734
767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
John W. Eaton <jwe@octave.org>
parents:
8733
diff
changeset
|
545 virtual sortmode is_sorted (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
546 |
8733
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8732
diff
changeset
|
547 virtual Array<octave_idx_type> |
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8732
diff
changeset
|
548 sort_rows_idx (sortmode mode = ASCENDING) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
549 |
8734
767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
John W. Eaton <jwe@octave.org>
parents:
8733
diff
changeset
|
550 virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
551 |
7489
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
552 virtual void lock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
553 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
554 virtual void unlock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
555 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
556 virtual bool islocked (void) const { return false; } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
557 |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
558 virtual void dump (std::ostream& os) const; |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
559 |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
560 virtual octave_value abs (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
561 virtual octave_value acos (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
562 virtual octave_value acosh (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
563 virtual octave_value angle (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
564 virtual octave_value arg (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
565 virtual octave_value asin (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
566 virtual octave_value asinh (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
567 virtual octave_value atan (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
568 virtual octave_value atanh (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
569 virtual octave_value ceil (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
570 virtual octave_value conj (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
571 virtual octave_value cos (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
572 virtual octave_value cosh (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
573 virtual octave_value erf (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
574 virtual octave_value erfc (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
575 virtual octave_value exp (void) const; |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
576 virtual octave_value expm1 (void) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
577 virtual octave_value finite (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
578 virtual octave_value fix (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
579 virtual octave_value floor (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
580 virtual octave_value gamma (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
581 virtual octave_value imag (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
582 virtual octave_value isinf (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
583 virtual octave_value isna (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
584 virtual octave_value isnan (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
585 virtual octave_value lgamma (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
586 virtual octave_value log (void) const; |
7740 | 587 virtual octave_value log2 (void) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
588 virtual octave_value log10 (void) const; |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
589 virtual octave_value log1p (void) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
590 virtual octave_value real (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
591 virtual octave_value round (void) const; |
7636
99c410f7f0b0
implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents:
7620
diff
changeset
|
592 virtual octave_value roundb (void) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
593 virtual octave_value signum (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
594 virtual octave_value sin (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
595 virtual octave_value sinh (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
596 virtual octave_value sqrt (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
597 virtual octave_value tan (void) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
598 virtual octave_value tanh (void) const; |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
599 |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
600 // These functions are prefixed with X to avoid potential macro |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
601 // conflicts. |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
602 |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
603 virtual octave_value xisalnum (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
604 virtual octave_value xisalpha (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
605 virtual octave_value xisascii (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
606 virtual octave_value xiscntrl (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
607 virtual octave_value xisdigit (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
608 virtual octave_value xisgraph (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
609 virtual octave_value xislower (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
610 virtual octave_value xisprint (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
611 virtual octave_value xispunct (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
612 virtual octave_value xisspace (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
613 virtual octave_value xisupper (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
614 virtual octave_value xisxdigit (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
615 virtual octave_value xtoascii (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
616 virtual octave_value xtolower (void) const; |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
617 virtual octave_value xtoupper (void) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
618 |
5759 | 619 protected: |
620 | |
621 // This should only be called for derived types. | |
622 | |
623 octave_value numeric_assign (const std::string& type, | |
624 const std::list<octave_value_list>& idx, | |
625 const octave_value& rhs); | |
626 | |
627 void reset_indent_level (void) const | |
628 { curr_print_indent_level = 0; } | |
629 | |
630 void increment_indent_level (void) const | |
631 { curr_print_indent_level += 2; } | |
632 | |
633 void decrement_indent_level (void) const | |
634 { curr_print_indent_level -= 2; } | |
635 | |
636 int current_print_indent_level (void) const | |
637 { return curr_print_indent_level; } | |
638 | |
639 void indent (std::ostream& os) const; | |
640 | |
641 void newline (std::ostream& os) const; | |
642 | |
643 void reset (void) const; | |
644 | |
645 // A reference count. | |
646 int count; | |
4944 | 647 |
2376 | 648 private: |
649 | |
5759 | 650 static int curr_print_indent_level; |
651 static bool beginning_of_line; | |
652 | |
653 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA | |
2376 | 654 }; |
655 | |
7193 | 656 // TRUE means to perform automatic sparse to real mutation if there |
657 // is memory to be saved | |
658 extern bool Vsparse_auto_mutate; | |
659 | |
2376 | 660 #endif |
661 | |
662 /* | |
663 ;;; Local Variables: *** | |
664 ;;; mode: C++ *** | |
665 ;;; End: *** | |
666 */ |