Mercurial > octave
annotate libinterp/octave-value/ov-base.h @ 24624:ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
* Array.h, dim-vector.h, gzip.cc, octave-link.h, octave-qt-link.h,
oct-parse.in.yy, oct-string.h, ov-base.h, ov.h, ovl.h, str-vec.h: Use uniform
C++ block commenting style consistent with the rest of Octave. Don't use
unnecessary @brief or @class markers. Use @-style commands instead of \-style.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 19 Jan 2018 19:59:28 -0800 |
parents | f5ad5d6f16fd |
children | 78aff6f14227 |
rev | line source |
---|---|
2376 | 1 /* |
2 | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
3 Copyright (C) 1996-2017 John W. Eaton |
11523 | 4 Copyright (C) 2009-2010 VZLU Prague |
2376 | 5 |
6 This file is part of Octave. | |
7 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24350
diff
changeset
|
8 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
9 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24350
diff
changeset
|
10 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
11 (at your option) any later version. |
2376 | 12 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
16 GNU General Public License for more details. |
2376 | 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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24350
diff
changeset
|
20 <https://www.gnu.org/licenses/>. |
2376 | 21 |
22 */ | |
23 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20700
diff
changeset
|
24 #if ! defined (octave_ov_base_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
25 #define octave_ov_base_h 1 |
2376 | 26 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21228
diff
changeset
|
27 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21228
diff
changeset
|
28 |
2376 | 29 #include <cstdlib> |
30 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
31 #include <iosfwd> |
5759 | 32 #include <list> |
2376 | 33 #include <string> |
34 | |
5759 | 35 #include "Range.h" |
5828 | 36 #include "data-conv.h" |
2376 | 37 #include "mx-base.h" |
38 #include "str-vec.h" | |
39 | |
40 #include "error.h" | |
20264
bfe66db8addb
don't include hdf5.h or use HDF5 typedefs in public header files (bug #43180)
John W. Eaton <jwe@octave.org>
parents:
20229
diff
changeset
|
41 #include "oct-hdf5-types.h" |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
42 #include "oct-stream.h" |
2376 | 43 |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
44 namespace octave |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
45 { |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
46 class type_info; |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
47 |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
48 // FIXME: This is not ideal, but it avoids including |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 // interpreter-private.h here and bringing in a lot of unnecessary |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 // symbols that require even more header files. |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
52 extern type_info& __get_type_info__ (const std::string&); |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
53 } |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
54 |
3351 | 55 class Cell; |
15149
62a35ae7d6a2
use forward decls for mxArray in ov.h and ov-base.h
John W. Eaton <jwe@octave.org>
parents:
15057
diff
changeset
|
56 class mxArray; |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
57 class octave_map; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
58 class octave_scalar_map; |
5759 | 59 class octave_value; |
2376 | 60 class octave_value_list; |
23881
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
61 class octave_classdef; |
5759 | 62 class octave_function; |
63 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
|
64 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
|
65 class octave_user_code; |
5759 | 66 class octave_fcn_handle; |
67 class octave_fcn_inline; | |
68 class octave_value_list; | |
2376 | 69 |
9685 | 70 enum builtin_type_t |
71 { | |
72 btyp_double, | |
73 btyp_float, | |
74 btyp_complex, | |
75 btyp_float_complex, | |
76 btyp_int8, | |
77 btyp_int16, | |
78 btyp_int32, | |
79 btyp_int64, | |
80 btyp_uint8, | |
81 btyp_uint16, | |
82 btyp_uint32, | |
83 btyp_uint64, | |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
84 btyp_bool, |
9685 | 85 btyp_char, |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
86 btyp_struct, |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
87 btyp_cell, |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
88 btyp_func_handle, |
9743
26abff55f6fe
optimize bsxfun for common built-in operations
Jaroslav Hajek <highegg@gmail.com>
parents:
9689
diff
changeset
|
89 btyp_unknown, |
26abff55f6fe
optimize bsxfun for common built-in operations
Jaroslav Hajek <highegg@gmail.com>
parents:
9689
diff
changeset
|
90 btyp_num_types = btyp_unknown |
9685 | 91 }; |
92 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
93 extern OCTINTERP_API std::string |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
94 btyp_class_name [btyp_num_types]; |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
95 |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
96 inline bool btyp_isnumeric (builtin_type_t btyp) |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
97 { return btyp <= btyp_uint64; } |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
98 |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
99 inline bool btyp_isinteger (builtin_type_t btyp) |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
100 { return btyp >= btyp_int8 && btyp <= btyp_uint64; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
101 |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
102 inline bool btyp_isfloat (builtin_type_t btyp) |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
103 { return btyp <= btyp_float_complex; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
104 |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
105 inline bool btyp_isarray (builtin_type_t btyp) |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
106 { return btyp <= btyp_char; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
107 |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
108 //! Determine the resulting type for a possible mixed-type operation. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
109 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
110 //! Rules for the resulting type: |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
111 //! - bool -> double |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
112 //! - single + double -> single |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
113 //! - real + complex -> complex |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
114 //! - integer + real -> integer |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
115 //! - uint + uint -> uint (the bigger one) |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
116 //! - sint + sint -> sint (the bigger one) |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
117 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
118 //! @return The resulting type or "unknown type", if the resulting type cannot |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
119 //! be determined. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
120 |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
121 extern OCTINTERP_API |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
122 builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y); |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
123 |
21139
538b57866b90
consistently use "typename" intead of "class" in template declarations
John W. Eaton <jwe@octave.org>
parents:
21134
diff
changeset
|
124 template <typename T> |
9685 | 125 struct class_to_btyp |
126 { | |
127 static const builtin_type_t btyp = btyp_unknown; | |
128 }; | |
129 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
130 #define DEF_CLASS_TO_BTYP(CLASS,BTYP) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
131 template <> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
132 struct class_to_btyp<CLASS> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
133 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
134 static const builtin_type_t btyp = BTYP; \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
135 } |
9685 | 136 |
137 DEF_CLASS_TO_BTYP (double, btyp_double); | |
138 DEF_CLASS_TO_BTYP (float, btyp_float); | |
139 DEF_CLASS_TO_BTYP (Complex, btyp_complex); | |
140 DEF_CLASS_TO_BTYP (FloatComplex, btyp_float_complex); | |
141 DEF_CLASS_TO_BTYP (octave_int8, btyp_int8); | |
142 DEF_CLASS_TO_BTYP (octave_int16, btyp_int16); | |
143 DEF_CLASS_TO_BTYP (octave_int32, btyp_int32); | |
144 DEF_CLASS_TO_BTYP (octave_int64, btyp_int64); | |
145 DEF_CLASS_TO_BTYP (octave_uint8, btyp_uint8); | |
146 DEF_CLASS_TO_BTYP (octave_uint16, btyp_uint16); | |
147 DEF_CLASS_TO_BTYP (octave_uint32, btyp_uint32); | |
148 DEF_CLASS_TO_BTYP (octave_uint64, btyp_uint64); | |
149 DEF_CLASS_TO_BTYP (bool, btyp_bool); | |
150 DEF_CLASS_TO_BTYP (char, btyp_char); | |
151 | |
5759 | 152 // T_ID is the type id of struct objects, set by register_type(). |
153 // T_NAME is the type name of struct objects. | |
7067 | 154 |
21228
77a622392714
define OCTAVE_EMPTY_CPP_ARG just prior to only use
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
155 #define OCTAVE_EMPTY_CPP_ARG /* empty */ |
77a622392714
define OCTAVE_EMPTY_CPP_ARG just prior to only use
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
156 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
157 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \ |
7066 | 158 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG) |
5759 | 159 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
160 #define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA \ |
5759 | 161 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual) |
162 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
163 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
164 public: \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
165 VIRTUAL int type_id (void) const { return t_id; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
166 VIRTUAL std::string type_name (void) const { return t_name; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
167 VIRTUAL std::string class_name (void) const { return c_name; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
168 static int static_type_id (void) { return t_id; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
169 static std::string static_type_name (void) { return t_name; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
170 static std::string static_class_name (void) { return c_name; } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
171 static void register_type (void); \ |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
172 static void register_type (octave::type_info&); \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
173 \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
174 private: \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
175 static int t_id; \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
176 static const std::string t_name; \ |
5759 | 177 static const std::string c_name; |
178 | |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
179 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
180 int t::t_id (-1); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
181 const std::string t::t_name (n); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
182 const std::string t::c_name (c); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
183 void t::register_type (void) \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
184 { \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
185 octave::type_info& type_info \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
186 = octave::__get_type_info__ (#t "::register_type"); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
187 \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
188 register_type (type_info); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
189 } \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
190 void t::register_type (octave::type_info& ti) \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
191 { \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
192 octave_value v (new t ()); \ |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
193 t_id = ti.register_type (t::t_name, t::c_name, v); \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
194 } |
5759 | 195 |
2477 | 196 // A base value type, so that derived types only have to redefine what |
197 // they need (if they are derived from octave_base_value instead of | |
198 // octave_value). | |
2376 | 199 |
200 class | |
6109 | 201 OCTINTERP_API |
5759 | 202 octave_base_value |
2376 | 203 { |
204 public: | |
205 | |
5759 | 206 typedef octave_base_value * (*type_conv_fcn) (const octave_base_value&); |
207 | |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
208 // type conversion, including result type information |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
209 class type_conv_info |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
210 { |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
211 public: |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
212 type_conv_info (type_conv_fcn f = nullptr, int t = -1) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
213 : _fcn (f), _type_id (t) { } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
214 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
215 operator type_conv_fcn (void) const { return _fcn; } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
216 |
23433
c9fab0bc983e
maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
217 octave_base_value * operator () (const octave_base_value& v) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
218 { return (*_fcn) (v); } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
219 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
220 int type_id (void) const { return _type_id; } |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
221 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
222 private: |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
223 type_conv_fcn _fcn; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
224 int _type_id; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
225 }; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
226 |
5759 | 227 friend class octave_value; |
2376 | 228 |
5759 | 229 octave_base_value (void) : count (1) { } |
230 | |
9521 | 231 octave_base_value (const octave_base_value&) : count (1) { } |
2376 | 232 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
233 virtual ~octave_base_value (void) = default; |
5759 | 234 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
235 // Unconditional clone. Always clones. |
5759 | 236 virtual octave_base_value * |
237 clone (void) const { return new octave_base_value (*this); } | |
2376 | 238 |
9521 | 239 // Empty clone. |
5759 | 240 virtual octave_base_value * |
10544
9961fc022d9d
fix assignment to non-existing variables and octave_value::assign
Jaroslav Hajek <highegg@gmail.com>
parents:
10521
diff
changeset
|
241 empty_clone (void) const; |
2376 | 242 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
243 // Unique clone. Usually clones, but may be overridden to fake the |
9521 | 244 // cloning when sharing copies is to be controlled from within an |
245 // instance (see octave_class). | |
246 virtual octave_base_value * | |
247 unique_clone (void) { return clone (); } | |
248 | |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
249 virtual type_conv_info |
5759 | 250 numeric_conversion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
251 { return type_conv_info (); } |
2410 | 252 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
253 virtual type_conv_info |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
254 numeric_demotion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
255 { return type_conv_info (); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
256 |
5759 | 257 virtual octave_value squeeze (void) const; |
258 | |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
259 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
|
260 |
22296
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
261 virtual octave_value as_double (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
262 virtual octave_value as_single (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
263 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
264 virtual octave_value as_int8 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
265 virtual octave_value as_int16 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
266 virtual octave_value as_int32 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
267 virtual octave_value as_int64 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
268 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
269 virtual octave_value as_uint8 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
270 virtual octave_value as_uint16 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
271 virtual octave_value as_uint32 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
272 virtual octave_value as_uint64 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
273 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
274 virtual octave_base_value * try_narrowing_conversion (void) { return nullptr; } |
4532 | 275 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
276 virtual void maybe_economize (void) { } |
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
277 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
278 virtual Matrix size (void); |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
279 |
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
280 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
|
281 |
5759 | 282 virtual octave_value |
283 subsref (const std::string& type, | |
10313 | 284 const std::list<octave_value_list>& idx); |
3933 | 285 |
5759 | 286 virtual octave_value_list |
287 subsref (const std::string& type, | |
10313 | 288 const std::list<octave_value_list>& idx, |
289 int nargout); | |
3933 | 290 |
5759 | 291 virtual octave_value |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
292 subsref (const std::string& type, |
10313 | 293 const std::list<octave_value_list>& idx, |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
294 bool auto_add); |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
295 |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
296 virtual octave_value |
5885 | 297 do_index_op (const octave_value_list& idx, bool resize_ok = false); |
2974 | 298 |
9147
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
299 virtual void assign (const std::string&, const octave_value&) { } |
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
300 |
5759 | 301 virtual octave_value |
302 subsasgn (const std::string& type, | |
10313 | 303 const std::list<octave_value_list>& idx, |
304 const octave_value& rhs); | |
2376 | 305 |
12171
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
306 virtual octave_value |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
307 undef_subsasgn (const std::string& type, |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
308 const std::list<octave_value_list>& idx, |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
309 const octave_value& rhs); |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
310 |
18130
e473c4853afc
enable non-integer ranges as indices by default and deprecate preference
John W. Eaton <jwe@octave.org>
parents:
17870
diff
changeset
|
311 virtual idx_vector index_vector (bool require_integers = false) const; |
2376 | 312 |
10181
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
313 virtual dim_vector dims (void) const { return dim_vector (); } |
4559 | 314 |
5759 | 315 octave_idx_type rows (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
316 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
317 const dim_vector dv = dims (); |
5164 | 318 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
319 return dv(0); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
320 } |
4791 | 321 |
5759 | 322 octave_idx_type columns (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
323 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
324 const dim_vector dv = dims (); |
5602 | 325 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
326 return dv(1); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
327 } |
5604 | 328 |
10652
2f0fbfa4dd23
simplify octave_base_value::ndims
Jaroslav Hajek <highegg@gmail.com>
parents:
10651
diff
changeset
|
329 virtual int ndims (void) const |
21660
53728df3e4c9
maint: for clarity, call ndims() rather than length() on dimension vectors.
Rik <rik@octave.org>
parents:
21244
diff
changeset
|
330 { return dims ().ndims (); } |
4567 | 331 |
5759 | 332 virtual octave_idx_type numel (void) const { return dims ().numel (); } |
4593 | 333 |
23615
be7b884ac589
use version number in OCTAVE_DEPRECATED macro
John W. Eaton <jwe@octave.org>
parents:
23589
diff
changeset
|
334 OCTAVE_DEPRECATED (4.4, "use 'numel' instead") |
21134
2e5c1f766ac9
provide replacement hints for deprecated C++ functions
John W. Eaton <jwe@octave.org>
parents:
21102
diff
changeset
|
335 virtual octave_idx_type capacity (void) const |
20229
5dfaaaae784f
Deprecate Array::capacity() and Sparse::capacity() for numel() and nzmax().
Carnë Draug <carandraug@octave.org>
parents:
20097
diff
changeset
|
336 { return numel (); } |
5759 | 337 |
338 virtual size_t byte_size (void) const { return 0; } | |
4915 | 339 |
5759 | 340 virtual octave_idx_type nnz (void) const; |
2376 | 341 |
5759 | 342 virtual octave_idx_type nzmax (void) const; |
343 | |
5900 | 344 virtual octave_idx_type nfields (void) const; |
345 | |
5759 | 346 virtual octave_value reshape (const dim_vector&) const; |
3351 | 347 |
5759 | 348 virtual octave_value permute (const Array<int>& vec, bool = false) const; |
2376 | 349 |
5759 | 350 virtual octave_value resize (const dim_vector&, bool fill = false) const; |
2376 | 351 |
5785 | 352 virtual MatrixType matrix_type (void) const; |
353 | |
354 virtual MatrixType matrix_type (const MatrixType& typ) const; | |
355 | |
5759 | 356 virtual bool is_defined (void) const { return false; } |
4505 | 357 |
23577
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
358 bool isempty (void) const { return (dims ().any_zero ()); } |
2376 | 359 |
23576
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23575
diff
changeset
|
360 virtual bool iscell (void) const { return false; } |
2376 | 361 |
23575
e95738a119da
maint: Deprecate is_cellstr and replace with iscellstr.
Rik <rik@octave.org>
parents:
23502
diff
changeset
|
362 virtual bool iscellstr (void) const { return false; } |
6116 | 363 |
5759 | 364 virtual bool is_real_scalar (void) const { return false; } |
4587 | 365 |
5759 | 366 virtual bool is_real_matrix (void) const { return false; } |
367 | |
368 virtual bool is_complex_scalar (void) const { return false; } | |
2376 | 369 |
5759 | 370 virtual bool is_complex_matrix (void) const { return false; } |
371 | |
5881 | 372 virtual bool is_bool_scalar (void) const { return false; } |
373 | |
5759 | 374 virtual bool is_bool_matrix (void) const { return false; } |
5279 | 375 |
5759 | 376 virtual bool is_char_matrix (void) const { return false; } |
2376 | 377 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
378 virtual bool is_diag_matrix (void) const { return false; } |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
379 |
8371
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8366
diff
changeset
|
380 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
|
381 |
5759 | 382 virtual bool is_string (void) const { return false; } |
2376 | 383 |
5759 | 384 virtual bool is_sq_string (void) const { return false; } |
4643 | 385 |
5759 | 386 virtual bool is_range (void) const { return false; } |
3977 | 387 |
23584
7ed6b258db91
maint: Deprecate is_map and replace with isstruct.
Rik <rik@octave.org>
parents:
23583
diff
changeset
|
388 virtual bool isstruct (void) const { return false; } |
5759 | 389 |
23587
0c468af9dc00
maint: Deprecate is_object and replace with isobject.
Rik <rik@octave.org>
parents:
23586
diff
changeset
|
390 virtual bool isobject (void) const { return false; } |
7336 | 391 |
23683
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
392 virtual bool is_classdef_meta (void) const { return false; } |
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
393 |
23865
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
394 virtual bool is_classdef_superclass_ref (void) const { return false; } |
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
395 |
19110
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
396 virtual bool is_classdef_object (void) const { return false; } |
23843
a52eb3f210af
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
23838
diff
changeset
|
397 |
23838
6e0fd7e3c262
Fix argument lookup in '+' package functions (Bug #51532).
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
398 virtual bool is_package (void) const { return false; } |
19110
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
399 |
23578
7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
Rik <rik@octave.org>
parents:
23577
diff
changeset
|
400 virtual bool isjava (void) const { return false; } |
15770 | 401 |
5759 | 402 virtual bool is_cs_list (void) const { return false; } |
2376 | 403 |
5759 | 404 virtual bool is_magic_colon (void) const { return false; } |
2376 | 405 |
5759 | 406 virtual bool is_all_va_args (void) const { return false; } |
2376 | 407 |
5759 | 408 virtual octave_value all (int = 0) const; |
409 | |
410 virtual octave_value any (int = 0) const; | |
2376 | 411 |
9685 | 412 virtual builtin_type_t builtin_type (void) const { return btyp_unknown; } |
413 | |
5895 | 414 virtual bool is_double_type (void) const { return false; } |
415 | |
416 virtual bool is_single_type (void) const { return false; } | |
417 | |
23585
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23584
diff
changeset
|
418 virtual bool isfloat (void) const { return false; } |
7576 | 419 |
5895 | 420 virtual bool is_int8_type (void) const { return false; } |
421 | |
422 virtual bool is_int16_type (void) const { return false; } | |
423 | |
424 virtual bool is_int32_type (void) const { return false; } | |
425 | |
426 virtual bool is_int64_type (void) const { return false; } | |
427 | |
428 virtual bool is_uint8_type (void) const { return false; } | |
429 | |
430 virtual bool is_uint16_type (void) const { return false; } | |
431 | |
432 virtual bool is_uint32_type (void) const { return false; } | |
433 | |
434 virtual bool is_uint64_type (void) const { return false; } | |
435 | |
23579
c20a0fa91c0c
maint: Deprecate is_bool_type and replace with islogical.
Rik <rik@octave.org>
parents:
23578
diff
changeset
|
436 virtual bool islogical (void) const { return false; } |
3209 | 437 |
23580
2230f9e10fb3
maint: Deprecate is_integer_type and replace with isinteger.
Rik <rik@octave.org>
parents:
23579
diff
changeset
|
438 virtual bool isinteger (void) const { return false; } |
6223 | 439 |
23582
0cc2011d800e
maint: Deprecate is_real_type and replace with isreal.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
440 virtual bool isreal (void) const { return false; } |
2376 | 441 |
23581
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23580
diff
changeset
|
442 virtual bool iscomplex (void) const { return false; } |
2376 | 443 |
444 // Would be nice to get rid of the next four functions: | |
445 | |
5759 | 446 virtual bool is_scalar_type (void) const { return false; } |
2376 | 447 |
5759 | 448 virtual bool is_matrix_type (void) const { return false; } |
2376 | 449 |
23586
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
450 virtual bool isnumeric (void) const { return false; } |
2376 | 451 |
23583
b7747a2c88b2
maint: Deprecate is_sparse_type and replace with issparse.
Rik <rik@octave.org>
parents:
23582
diff
changeset
|
452 virtual bool issparse (void) const { return false; } |
5631 | 453 |
5759 | 454 virtual bool is_true (void) const { return false; } |
455 | |
23589
63950abd2f81
maint: Deprecate is_null_type and replace with isnull.
Rik <rik@octave.org>
parents:
23588
diff
changeset
|
456 virtual bool isnull (void) const { return false; } |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
7885
diff
changeset
|
457 |
5759 | 458 virtual bool is_constant (void) const { return false; } |
2376 | 459 |
5759 | 460 virtual bool is_function_handle (void) const { return false; } |
2376 | 461 |
13241
2a8dcb5b3a00
improve default indexing for objects
John W. Eaton <jwe@octave.org>
parents:
12171
diff
changeset
|
462 virtual bool is_anonymous_function (void) const { return false; } |
2a8dcb5b3a00
improve default indexing for objects
John W. Eaton <jwe@octave.org>
parents:
12171
diff
changeset
|
463 |
5759 | 464 virtual bool is_inline_function (void) const { return false; } |
2974 | 465 |
5759 | 466 virtual bool is_function (void) const { return false; } |
4954 | 467 |
7336 | 468 virtual bool is_user_script (void) const { return false; } |
469 | |
470 virtual bool is_user_function (void) const { return false; } | |
471 | |
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
|
472 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
|
473 |
5759 | 474 virtual bool is_builtin_function (void) const { return false; } |
2974 | 475 |
5759 | 476 virtual bool is_dld_function (void) const { return false; } |
3325 | 477 |
5864 | 478 virtual bool is_mex_function (void) const { return false; } |
479 | |
7876
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
480 virtual void erase_subfunctions (void) { } |
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
481 |
5759 | 482 virtual short int short_value (bool = false, bool = false) const; |
4254 | 483 |
5759 | 484 virtual unsigned short int ushort_value (bool = false, bool = false) const; |
4254 | 485 |
5759 | 486 virtual int int_value (bool = false, bool = false) const; |
3202 | 487 |
5759 | 488 virtual unsigned int uint_value (bool = false, bool = false) const; |
4254 | 489 |
5759 | 490 virtual int nint_value (bool = false) const; |
3202 | 491 |
5759 | 492 virtual long int long_value (bool = false, bool = false) const; |
4254 | 493 |
5759 | 494 virtual unsigned long int ulong_value (bool = false, bool = false) const; |
4254 | 495 |
16323
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
496 virtual int64_t int64_value (bool = false, bool = false) const; |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
497 |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
498 virtual uint64_t uint64_value (bool = false, bool = false) const; |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
499 |
5759 | 500 virtual double double_value (bool = false) const; |
2376 | 501 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
502 virtual float float_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
503 |
5759 | 504 virtual double scalar_value (bool frc_str_conv = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
505 { return double_value (frc_str_conv); } |
2376 | 506 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
507 virtual float float_scalar_value (bool frc_str_conv = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
508 { return float_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
509 |
5759 | 510 virtual Cell cell_value (void) const; |
3351 | 511 |
5759 | 512 virtual Matrix matrix_value (bool = false) const; |
3145 | 513 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
514 virtual FloatMatrix float_matrix_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
515 |
5759 | 516 virtual NDArray array_value (bool = false) const; |
4505 | 517 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
518 virtual FloatNDArray float_array_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
519 |
5759 | 520 virtual Complex complex_value (bool = false) const; |
2376 | 521 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
522 virtual FloatComplex float_complex_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
523 |
5759 | 524 virtual ComplexMatrix complex_matrix_value (bool = false) const; |
2376 | 525 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
526 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
|
527 |
5759 | 528 virtual ComplexNDArray complex_array_value (bool = false) const; |
4550 | 529 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
530 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
|
531 |
5943 | 532 virtual bool bool_value (bool = false) const; |
4550 | 533 |
5943 | 534 virtual boolMatrix bool_matrix_value (bool = false) const; |
4550 | 535 |
5943 | 536 virtual boolNDArray bool_array_value (bool = false) const; |
4550 | 537 |
5759 | 538 virtual charMatrix char_matrix_value (bool force = false) const; |
539 | |
540 virtual charNDArray char_array_value (bool = false) const; | |
2376 | 541 |
5759 | 542 virtual SparseMatrix sparse_matrix_value (bool = false) const; |
4550 | 543 |
5759 | 544 virtual SparseComplexMatrix sparse_complex_matrix_value (bool = false) const; |
5164 | 545 |
5759 | 546 virtual SparseBoolMatrix sparse_bool_matrix_value (bool = false) const; |
5164 | 547 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
548 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
|
549 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
550 virtual FloatDiagMatrix float_diag_matrix_value (bool = false) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
551 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
552 virtual ComplexDiagMatrix complex_diag_matrix_value (bool = false) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
553 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
554 virtual FloatComplexDiagMatrix |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
555 float_complex_diag_matrix_value (bool = false) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
556 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
557 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
|
558 |
5759 | 559 virtual octave_int8 int8_scalar_value (void) const; |
5164 | 560 |
5759 | 561 virtual octave_int16 int16_scalar_value (void) const; |
4910 | 562 |
5759 | 563 virtual octave_int32 int32_scalar_value (void) const; |
564 | |
565 virtual octave_int64 int64_scalar_value (void) const; | |
4910 | 566 |
5759 | 567 virtual octave_uint8 uint8_scalar_value (void) const; |
4910 | 568 |
5759 | 569 virtual octave_uint16 uint16_scalar_value (void) const; |
4910 | 570 |
5759 | 571 virtual octave_uint32 uint32_scalar_value (void) const; |
4910 | 572 |
5759 | 573 virtual octave_uint64 uint64_scalar_value (void) const; |
4910 | 574 |
5759 | 575 virtual int8NDArray int8_array_value (void) const; |
4910 | 576 |
5759 | 577 virtual int16NDArray int16_array_value (void) const; |
4910 | 578 |
5759 | 579 virtual int32NDArray int32_array_value (void) const; |
4906 | 580 |
5759 | 581 virtual int64NDArray int64_array_value (void) const; |
4906 | 582 |
5759 | 583 virtual uint8NDArray uint8_array_value (void) const; |
4906 | 584 |
5759 | 585 virtual uint16NDArray uint16_array_value (void) const; |
4906 | 586 |
5759 | 587 virtual uint32NDArray uint32_array_value (void) const; |
4906 | 588 |
5759 | 589 virtual uint64NDArray uint64_array_value (void) const; |
4906 | 590 |
20990
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
591 virtual string_vector string_vector_value (bool pad = false) const; |
4906 | 592 |
5759 | 593 virtual std::string string_value (bool force = false) const; |
4906 | 594 |
8732 | 595 virtual Array<std::string> cellstr_value (void) const; |
596 | |
5759 | 597 virtual Range range_value (void) const; |
2376 | 598 |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
599 virtual octave_map map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
600 |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
601 virtual octave_scalar_map scalar_map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
602 |
5759 | 603 virtual string_vector map_keys (void) const; |
2376 | 604 |
9151 | 605 virtual size_t nparents (void) const; |
606 | |
607 virtual std::list<std::string> parent_class_name_list (void) const; | |
608 | |
609 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
|
610 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
611 virtual octave_base_value * find_parent_class (const std::string&) |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
612 { return nullptr; } |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
613 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
614 virtual octave_base_value * unique_parent_class (const std::string&) |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
615 { return nullptr; } |
9767
0df32e0b2074
fix base class field assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
9743
diff
changeset
|
616 |
19103
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
617 virtual bool is_instance_of (const std::string&) const |
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
618 { return false; } |
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
619 |
23881
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
620 virtual octave_classdef * classdef_object_value (bool silent = false); |
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
621 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
622 virtual octave_function * function_value (bool silent = false); |
3933 | 623 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
624 virtual octave_user_function * user_function_value (bool silent = false); |
4645 | 625 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
626 virtual octave_user_script * user_script_value (bool silent = false); |
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
|
627 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
628 virtual octave_user_code * user_code_value (bool silent = false); |
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
|
629 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
630 virtual octave_fcn_handle * fcn_handle_value (bool silent = false); |
4643 | 631 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
632 virtual octave_fcn_inline * fcn_inline_value (bool silent = false); |
2974 | 633 |
5759 | 634 virtual octave_value_list list_value (void) const; |
4343 | 635 |
5759 | 636 virtual octave_value convert_to_str (bool pad = false, bool force = false, |
10313 | 637 char type = '\'') const; |
5759 | 638 virtual octave_value |
639 convert_to_str_internal (bool pad, bool force, char type) const; | |
4933 | 640 |
5759 | 641 virtual void convert_to_row_or_column_vector (void); |
2882 | 642 |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
643 // The following extractor functions don't perform any implicit type |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
644 // conversions. |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
645 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
646 virtual std::string xstring_value () const; |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
647 |
5759 | 648 virtual bool print_as_scalar (void) const { return false; } |
2376 | 649 |
18416
bcd71a2531d3
Support disp/display overloading in classdef
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18316
diff
changeset
|
650 virtual void print (std::ostream& os, bool pr_as_read_syntax = false); |
2376 | 651 |
5759 | 652 virtual void |
653 print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; | |
4604 | 654 |
5759 | 655 virtual bool |
656 print_name_tag (std::ostream& os, const std::string& name) const; | |
2901 | 657 |
5759 | 658 virtual void |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
659 print_with_name (std::ostream& output_buf, const std::string& name, |
10313 | 660 bool print_padding = true); |
2376 | 661 |
17870 | 662 virtual void short_disp (std::ostream& os) const { os << "..."; } |
16468
0f143f68078d
use signal/slot for updating workspace instead of using event listener
John W. Eaton <jwe@octave.org>
parents:
16323
diff
changeset
|
663 |
5759 | 664 virtual void print_info (std::ostream& os, const std::string& prefix) const; |
3933 | 665 |
6974 | 666 virtual bool save_ascii (std::ostream& os); |
4687 | 667 |
5759 | 668 virtual bool load_ascii (std::istream& is); |
4687 | 669 |
5759 | 670 virtual bool save_binary (std::ostream& os, bool& save_as_floats); |
4687 | 671 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
672 virtual bool load_binary (std::istream& is, bool swap, |
21739
c4ab2e54f100
use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents:
21660
diff
changeset
|
673 octave::mach_info::float_format fmt); |
4687 | 674 |
5759 | 675 virtual bool |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
676 save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats); |
4687 | 677 |
5759 | 678 virtual bool |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
679 load_hdf5 (octave_hdf5_id loc_id, const char *name); |
4687 | 680 |
5759 | 681 virtual int |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
682 write (octave::stream& os, int block_size, |
10313 | 683 oct_data_conv::data_type output_type, int skip, |
21739
c4ab2e54f100
use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents:
21660
diff
changeset
|
684 octave::mach_info::float_format flt_fmt) const; |
5759 | 685 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
686 virtual void * mex_get_data (void) const { return nullptr; } |
5900 | 687 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
688 virtual octave_idx_type * mex_get_ir (void) const { return nullptr; } |
5900 | 689 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
690 virtual octave_idx_type * mex_get_jc (void) const { return nullptr; } |
5900 | 691 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
692 virtual mxArray * as_mxArray (void) const; |
5900 | 693 |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
694 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
|
695 |
14557
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
696 virtual octave_value diag (octave_idx_type m, octave_idx_type n) const; |
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
697 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
698 virtual octave_value sort (octave_idx_type dim = 0, |
10313 | 699 sortmode mode = ASCENDING) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
700 virtual octave_value sort (Array<octave_idx_type> &sidx, |
10313 | 701 octave_idx_type dim = 0, |
702 sortmode mode = ASCENDING) const; | |
7433 | 703 |
23588
0549061d35b9
maint: Deprecate is_sorted and replace with issorted.
Rik <rik@octave.org>
parents:
23587
diff
changeset
|
704 virtual sortmode issorted (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
705 |
8733
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8732
diff
changeset
|
706 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
|
707 sort_rows_idx (sortmode mode = ASCENDING) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
708 |
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
|
709 virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
710 |
7489
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
711 virtual void lock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
712 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
713 virtual void unlock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
714 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
715 virtual bool islocked (void) const { return false; } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
716 |
23680
ef71711f6d64
rework __dump_symbol_table__ function
John W. Eaton <jwe@octave.org>
parents:
23626
diff
changeset
|
717 virtual octave_value dump (void) const; |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
718 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
719 // Standard mappers. Register new ones here. |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
720 enum unary_mapper_t |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
721 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
722 umap_abs, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
723 umap_acos, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
724 umap_acosh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
725 umap_angle, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
726 umap_arg, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
727 umap_asin, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
728 umap_asinh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
729 umap_atan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
730 umap_atanh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
731 umap_cbrt, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
732 umap_ceil, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
733 umap_conj, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
734 umap_cos, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
735 umap_cosh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
736 umap_erf, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
737 umap_erfinv, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
738 umap_erfcinv, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
739 umap_erfc, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
740 umap_erfcx, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
741 umap_erfi, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
742 umap_dawson, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
743 umap_exp, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
744 umap_expm1, |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
20990
diff
changeset
|
745 umap_isfinite, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
746 umap_fix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
747 umap_floor, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
748 umap_gamma, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
749 umap_imag, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
750 umap_isinf, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
751 umap_isna, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
752 umap_isnan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
753 umap_lgamma, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
754 umap_log, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
755 umap_log2, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
756 umap_log10, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
757 umap_log1p, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
758 umap_real, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
759 umap_round, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
760 umap_roundb, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
761 umap_signum, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
762 umap_sin, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
763 umap_sinh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
764 umap_sqrt, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
765 umap_tan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
766 umap_tanh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
767 umap_xisalnum, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
768 umap_xisalpha, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
769 umap_xisascii, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
770 umap_xiscntrl, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
771 umap_xisdigit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
772 umap_xisgraph, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
773 umap_xislower, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
774 umap_xisprint, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
775 umap_xispunct, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
776 umap_xisspace, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
777 umap_xisupper, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
778 umap_xisxdigit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
779 umap_xsignbit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
780 umap_xtolower, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
781 umap_xtoupper, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
782 umap_unknown, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
783 num_unary_mappers = umap_unknown |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
784 }; |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
785 |
9812
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9790
diff
changeset
|
786 virtual octave_value map (unary_mapper_t) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
787 |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
788 // These are fast indexing & assignment shortcuts for extracting |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
789 // or inserting a single scalar from/to an array. |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
790 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
791 // Extract the n-th element, aka val(n). Result is undefined if val is not |
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
792 // an array type or n is out of range. Never error. |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
793 virtual octave_value |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
794 fast_elem_extract (octave_idx_type n) const; |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
795 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
796 // Assign the n-th element, aka val(n) = x. Returns false if val is not an |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
797 // array type, x is not a matching scalar type, or n is out of range. |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
798 // Never error. |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
799 virtual bool |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
800 fast_elem_insert (octave_idx_type n, const octave_value& x); |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
801 |
20097
1f9ed81bd173
maint: Fix spelling and grammar mistakes in docs and comments (bug #44878)
Rafael Laboissiere <rafael@laboissiere.net>
parents:
19863
diff
changeset
|
802 // This is a helper for the above, to be overridden in scalar types. The |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
803 // whole point is to handle the insertion efficiently with just *two* VM |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
804 // calls, which is basically the theoretical minimum. |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
805 virtual bool |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
806 fast_elem_insert_self (void *where, builtin_type_t btyp) const; |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
807 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
808 // Grab the reference count. For use by jit. |
14903 | 809 void |
810 grab (void) | |
811 { | |
812 ++count; | |
813 } | |
814 | |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
815 // Release the reference count. For use by jit. |
14903 | 816 void |
817 release (void) | |
818 { | |
819 if (--count == 0) | |
820 delete this; | |
821 } | |
822 | |
5759 | 823 protected: |
824 | |
825 // This should only be called for derived types. | |
826 | |
827 octave_value numeric_assign (const std::string& type, | |
10313 | 828 const std::list<octave_value_list>& idx, |
829 const octave_value& rhs); | |
5759 | 830 |
831 void reset_indent_level (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
832 { curr_print_indent_level = 0; } |
5759 | 833 |
834 void increment_indent_level (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
835 { curr_print_indent_level += 2; } |
5759 | 836 |
837 void decrement_indent_level (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
838 { curr_print_indent_level -= 2; } |
5759 | 839 |
840 int current_print_indent_level (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
841 { return curr_print_indent_level; } |
5759 | 842 |
843 void indent (std::ostream& os) const; | |
844 | |
845 void newline (std::ostream& os) const; | |
846 | |
847 void reset (void) const; | |
848 | |
849 // A reference count. | |
9521 | 850 // NOTE: the declaration is octave_idx_type because with 64-bit indexing, |
851 // it is well possible to have more than MAX_INT copies of a single value | |
852 // (think of an empty cell array with >2G elements). | |
23012
27e4ec3b0b49
move octave_refcount inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
853 octave::refcount<octave_idx_type> count; |
4944 | 854 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
855 static const char * get_umap_name (unary_mapper_t); |
2376 | 856 |
21102
dfcb9d74b253
Rename local gripe_XXX functions to err_XXX or warn_XXX.
Rik <rik@octave.org>
parents:
21040
diff
changeset
|
857 void warn_load (const char *type) const; |
dfcb9d74b253
Rename local gripe_XXX functions to err_XXX or warn_XXX.
Rik <rik@octave.org>
parents:
21040
diff
changeset
|
858 void warn_save (const char *type) const; |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19697
diff
changeset
|
859 |
15501
814c4b0d5c49
make numeric mapper functions throw error for char args (bug #37535)
John W. Eaton <jwe@octave.org>
parents:
15487
diff
changeset
|
860 private: |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
861 |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
862 void wrong_type_arg_error (void) const; |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
863 |
5759 | 864 static int curr_print_indent_level; |
865 static bool beginning_of_line; | |
866 | |
867 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA | |
2376 | 868 }; |
869 | |
7193 | 870 // TRUE means to perform automatic sparse to real mutation if there |
871 // is memory to be saved | |
10612
09e244649f50
Export symbol Vsparse_auto_mutate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
10544
diff
changeset
|
872 extern OCTINTERP_API bool Vsparse_auto_mutate; |
7193 | 873 |
18314
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
874 // Utility function to convert C++ arguments used in subsref/subsasgn into an |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
875 // octave_value_list object that can be used to call a function/method in the |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
876 // interpreter. |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
877 extern OCTINTERP_API octave_value |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
878 make_idx_args (const std::string& type, |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
879 const std::list<octave_value_list>& idx, |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
880 const std::string& who); |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
881 |
18316
ff311e5ff6d8
Don't call classdef-overloaded subsref from builtin calls.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18314
diff
changeset
|
882 // Tells whether some regular octave_value_base methods are being called from |
ff311e5ff6d8
Don't call classdef-overloaded subsref from builtin calls.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18314
diff
changeset
|
883 // within the "builtin" function. |
ff311e5ff6d8
Don't call classdef-overloaded subsref from builtin calls.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18314
diff
changeset
|
884 extern OCTINTERP_API bool called_from_builtin (void); |
ff311e5ff6d8
Don't call classdef-overloaded subsref from builtin calls.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18314
diff
changeset
|
885 |
2376 | 886 #endif |