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