Mercurial > octave
annotate libinterp/octave-value/ov-base.h @ 31260:c5c8bf50449c
Improve performance of isfield from linear time to constant time (bug #58105)
Patch author: Anonymous in Bug #58105 Comment #7
https://savannah.gnu.org/bugs/index.php?58105#comment7
The isfield function was taking time proportional to the number of
fields in a struct to determine whether something was a member or not.
With this change, isfield performance becomes constant irrespective
of the number of fields, speeding up performance by over 200X, and
also allowing the use of struct as a hashmap if the user desires.
ov-base.h: Add new isfield function declaration
ov-base.cc: Add new isfield function definition
ov-struct.h: Add new isfield function definitions
ov-struct.cc: Do not call map_value
ov.h: Add new isfield function definition
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Wed, 05 Oct 2022 10:35:31 -0400 |
parents | b3ca7f891750 |
children | e88a07dec498 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30390
diff
changeset
|
3 // Copyright (C) 1996-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
2376 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20700
diff
changeset
|
26 #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
|
27 #define octave_ov_base_h 1 |
2376 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21228
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21228
diff
changeset
|
30 |
2376 | 31 #include <cstdlib> |
32 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
33 #include <iosfwd> |
5759 | 34 #include <list> |
29476
c74ff452e2bb
avoid memory leaks when returning handles to nested functions
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
35 #include <memory> |
2376 | 36 #include <string> |
37 | |
5759 | 38 #include "Range.h" |
5828 | 39 #include "data-conv.h" |
2376 | 40 #include "mx-base.h" |
41 #include "str-vec.h" | |
42 | |
30750
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
43 #include "auto-shlib.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
|
44 #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
|
45 #include "oct-stream.h" |
2376 | 46 |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
47 namespace octave |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
48 { |
29476
c74ff452e2bb
avoid memory leaks when returning handles to nested functions
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
49 class stack_frame; |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 class type_info; |
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 // 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
|
53 // interpreter-private.h here and bringing in a lot of unnecessary |
31105
670a0d878af1
eliminate WHO arguments from interpreter-private functions
John W. Eaton <jwe@octave.org>
parents:
30854
diff
changeset
|
54 // symbols that require even more header files. Since the typeinfo |
670a0d878af1
eliminate WHO arguments from interpreter-private functions
John W. Eaton <jwe@octave.org>
parents:
30854
diff
changeset
|
55 // object is required to load a user-defined octave_value object, |
670a0d878af1
eliminate WHO arguments from interpreter-private functions
John W. Eaton <jwe@octave.org>
parents:
30854
diff
changeset
|
56 // maybe this function should be declared in a public header file? |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
57 |
31105
670a0d878af1
eliminate WHO arguments from interpreter-private functions
John W. Eaton <jwe@octave.org>
parents:
30854
diff
changeset
|
58 extern OCTINTERP_API type_info& __get_type_info__ (void); |
31106
d98abdd15d40
* ov-base.h (__get_type_info__): Provide backward compatibility function.
John W. Eaton <jwe@octave.org>
parents:
31105
diff
changeset
|
59 |
31138
b3ca7f891750
maint: use "m_" prefix for member variables in class octave_base_matrix.
Rik <rik@octave.org>
parents:
31106
diff
changeset
|
60 // For now just preserve the old interface and don't mark it as deprecated. |
b3ca7f891750
maint: use "m_" prefix for member variables in class octave_base_matrix.
Rik <rik@octave.org>
parents:
31106
diff
changeset
|
61 // This function is currently an internal, private function. Additional |
b3ca7f891750
maint: use "m_" prefix for member variables in class octave_base_matrix.
Rik <rik@octave.org>
parents:
31106
diff
changeset
|
62 // changes may be made before version 8 is finally released. |
31106
d98abdd15d40
* ov-base.h (__get_type_info__): Provide backward compatibility function.
John W. Eaton <jwe@octave.org>
parents:
31105
diff
changeset
|
63 inline type_info& __get_type_info__ (const std::string&) { return __get_type_info__ (); } |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
64 } |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
65 |
3351 | 66 class Cell; |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24657
diff
changeset
|
67 class float_display_format; |
15149
62a35ae7d6a2
use forward decls for mxArray in ov.h and ov-base.h
John W. Eaton <jwe@octave.org>
parents:
15057
diff
changeset
|
68 class mxArray; |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
69 class octave_map; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
70 class octave_scalar_map; |
5759 | 71 class octave_value; |
2376 | 72 class octave_value_list; |
23881
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
73 class octave_classdef; |
5759 | 74 class octave_function; |
75 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
|
76 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
|
77 class octave_user_code; |
5759 | 78 class octave_fcn_handle; |
79 class octave_value_list; | |
2376 | 80 |
9685 | 81 enum builtin_type_t |
82 { | |
83 btyp_double, | |
84 btyp_float, | |
85 btyp_complex, | |
86 btyp_float_complex, | |
87 btyp_int8, | |
88 btyp_int16, | |
89 btyp_int32, | |
90 btyp_int64, | |
91 btyp_uint8, | |
92 btyp_uint16, | |
93 btyp_uint32, | |
94 btyp_uint64, | |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
95 btyp_bool, |
9685 | 96 btyp_char, |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
97 btyp_struct, |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
98 btyp_cell, |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
99 btyp_func_handle, |
9743
26abff55f6fe
optimize bsxfun for common built-in operations
Jaroslav Hajek <highegg@gmail.com>
parents:
9689
diff
changeset
|
100 btyp_unknown, |
26abff55f6fe
optimize bsxfun for common built-in operations
Jaroslav Hajek <highegg@gmail.com>
parents:
9689
diff
changeset
|
101 btyp_num_types = btyp_unknown |
9685 | 102 }; |
103 | |
28632
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
104 extern OCTINTERP_API std::string btyp_class_name []; |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
105 |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
106 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
|
107 { return btyp <= btyp_uint64; } |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
108 |
10087
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
109 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
|
110 { return btyp >= btyp_int8 && btyp <= btyp_uint64; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
111 |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
112 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
|
113 { return btyp <= btyp_float_complex; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
114 |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
115 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
|
116 { return btyp <= btyp_char; } |
090173f2db40
improve overload dispatching of built-in classes
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
117 |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
118 //! 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
|
119 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
120 //! Rules for the resulting type: |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
121 //! - bool -> double |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
122 //! - single + double -> single |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
123 //! - real + complex -> complex |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
124 //! - integer + real -> integer |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
125 //! - uint + uint -> uint (the bigger one) |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
126 //! - sint + sint -> sint (the bigger one) |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
127 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
128 //! @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
|
129 //! be determined. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
130 |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
131 extern OCTINTERP_API |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
9767
diff
changeset
|
132 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
|
133 |
21139
538b57866b90
consistently use "typename" intead of "class" in template declarations
John W. Eaton <jwe@octave.org>
parents:
21134
diff
changeset
|
134 template <typename T> |
9685 | 135 struct class_to_btyp |
136 { | |
137 static const builtin_type_t btyp = btyp_unknown; | |
138 }; | |
139 | |
28632
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
140 template <builtin_type_t BTYP> |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
141 struct btyp_to_class |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
142 { |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
143 typedef void type; |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
144 }; |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
145 |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
146 #define DEF_BTYP_TRAITS(BTYP, CLASS) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
147 template <> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
148 struct class_to_btyp<CLASS> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
149 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
150 static const builtin_type_t btyp = BTYP; \ |
28632
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
151 }; \ |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
152 \ |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
153 template <> \ |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
154 struct btyp_to_class<BTYP> \ |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
155 { \ |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
156 typedef CLASS type; \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
157 } |
9685 | 158 |
28632
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
159 DEF_BTYP_TRAITS (btyp_double, double); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
160 DEF_BTYP_TRAITS (btyp_float, float); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
161 DEF_BTYP_TRAITS (btyp_complex, Complex); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
162 DEF_BTYP_TRAITS (btyp_float_complex, FloatComplex); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
163 DEF_BTYP_TRAITS (btyp_int8, octave_int8); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
164 DEF_BTYP_TRAITS (btyp_int16, octave_int16); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
165 DEF_BTYP_TRAITS (btyp_int32, octave_int32); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
166 DEF_BTYP_TRAITS (btyp_int64, octave_int64); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
167 DEF_BTYP_TRAITS (btyp_uint8, octave_uint8); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
168 DEF_BTYP_TRAITS (btyp_uint16, octave_uint16); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
169 DEF_BTYP_TRAITS (btyp_uint32, octave_uint32); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
170 DEF_BTYP_TRAITS (btyp_uint64, octave_uint64); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
171 DEF_BTYP_TRAITS (btyp_bool, bool); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
172 DEF_BTYP_TRAITS (btyp_char, char); |
6aa0808d2ed6
also provide builtin type to class traits
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
173 |
9685 | 174 |
5759 | 175 // T_ID is the type id of struct objects, set by register_type(). |
176 // T_NAME is the type name of struct objects. | |
7067 | 177 |
21228
77a622392714
define OCTAVE_EMPTY_CPP_ARG just prior to only use
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
178 #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
|
179 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
180 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \ |
7066 | 181 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG) |
5759 | 182 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
183 #define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA \ |
5759 | 184 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual) |
185 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
186 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
187 public: \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
188 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
|
189 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
|
190 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
|
191 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
|
192 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
|
193 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
|
194 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
|
195 static void register_type (octave::type_info&); \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
196 \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
197 private: \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
198 static int t_id; \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
199 static const std::string t_name; \ |
5759 | 200 static const std::string c_name; |
201 | |
28642
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
202 #define DECLARE_TEMPLATE_OV_TYPEID_SPECIALIZATIONS(cls, type) \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
203 template <> void cls<type>::register_type (void); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
204 template <> void cls<type>::register_type (octave::type_info&); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
205 template <> int cls<type>::t_id; \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
206 template <> const std::string cls<type>::t_name; \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
207 template <> const std::string cls<type>::c_name; |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
208 |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
209 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL(tspec, t, n, c) \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
210 tspec int t::t_id (-1); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
211 tspec const std::string t::t_name (n); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
212 tspec const std::string t::c_name (c); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
213 tspec void t::register_type (void) \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
214 { \ |
31105
670a0d878af1
eliminate WHO arguments from interpreter-private functions
John W. Eaton <jwe@octave.org>
parents:
30854
diff
changeset
|
215 octave::type_info& type_info = octave::__get_type_info__ (); \ |
28642
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
216 \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
217 register_type (type_info); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
218 } \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
219 tspec void t::register_type (octave::type_info& ti) \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
220 { \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
221 octave_value v (new t ()); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
222 t_id = ti.register_type (t::t_name, t::c_name, v); \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
223 } |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
224 |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
225 #define DEFINE_TEMPLATE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \ |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
226 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL (template <>, t, n, c) |
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
227 |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
228 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \ |
28642
0237b10e3943
allow template types in OV_TYPEID macros
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
229 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL ( , t, n, c) |
5759 | 230 |
2477 | 231 // A base value type, so that derived types only have to redefine what |
232 // they need (if they are derived from octave_base_value instead of | |
233 // octave_value). | |
2376 | 234 |
235 class | |
6109 | 236 OCTINTERP_API |
5759 | 237 octave_base_value |
2376 | 238 { |
239 public: | |
240 | |
5759 | 241 typedef octave_base_value * (*type_conv_fcn) (const octave_base_value&); |
242 | |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
243 // type conversion, including result type information |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
244 class type_conv_info |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
245 { |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
246 public: |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23683
diff
changeset
|
247 type_conv_info (type_conv_fcn f = nullptr, int t = -1) |
30038
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
248 : m_fcn (f), m_type_id (t) { } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
249 |
30038
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
250 operator type_conv_fcn (void) const { return m_fcn; } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
251 |
23433
c9fab0bc983e
maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
252 octave_base_value * operator () (const octave_base_value& v) const |
30038
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
253 { return (*m_fcn) (v); } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
254 |
30038
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
255 int type_id (void) const { return m_type_id; } |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
256 |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
257 private: |
30038
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
258 type_conv_fcn m_fcn; |
18fd44941006
maint: use "m_" prefix for member variables in ov-base.h
Rik <rik@octave.org>
parents:
29949
diff
changeset
|
259 int m_type_id; |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
260 }; |
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
261 |
5759 | 262 friend class octave_value; |
2376 | 263 |
30139
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
264 octave_base_value (void) : count (1) { } |
5759 | 265 |
30139
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
266 octave_base_value (const octave_base_value&) : count (1) { } |
2376 | 267 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
268 virtual ~octave_base_value (void) = default; |
5759 | 269 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
270 // Unconditional clone. Always clones. |
5759 | 271 virtual octave_base_value * |
272 clone (void) const { return new octave_base_value (*this); } | |
2376 | 273 |
9521 | 274 // Empty clone. |
5759 | 275 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
|
276 empty_clone (void) const; |
2376 | 277 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
278 // Unique clone. Usually clones, but may be overridden to fake the |
9521 | 279 // cloning when sharing copies is to be controlled from within an |
280 // instance (see octave_class). | |
281 virtual octave_base_value * | |
282 unique_clone (void) { return clone (); } | |
283 | |
30139
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
284 virtual void break_closure_cycles (const std::shared_ptr<octave::stack_frame>&) { } |
29476
c74ff452e2bb
avoid memory leaks when returning handles to nested functions
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
285 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
286 virtual type_conv_info |
5759 | 287 numeric_conversion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
288 { return type_conv_info (); } |
2410 | 289 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
290 virtual type_conv_info |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
291 numeric_demotion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
292 { return type_conv_info (); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
293 |
5759 | 294 virtual octave_value squeeze (void) const; |
295 | |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
296 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
|
297 |
22296
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
298 virtual octave_value as_double (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
299 virtual octave_value as_single (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
300 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
301 virtual octave_value as_int8 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
302 virtual octave_value as_int16 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
303 virtual octave_value as_int32 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
304 virtual octave_value as_int64 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
305 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
306 virtual octave_value as_uint8 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
307 virtual octave_value as_uint16 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
308 virtual octave_value as_uint32 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
309 virtual octave_value as_uint64 (void) const; |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
310 |
30346
91c6288781ba
maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents:
30232
diff
changeset
|
311 virtual octave_base_value * try_narrowing_conversion (void) |
91c6288781ba
maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents:
30232
diff
changeset
|
312 { return nullptr; } |
4532 | 313 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
314 virtual void maybe_economize (void) { } |
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
315 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
316 virtual Matrix size (void); |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
317 |
26922
072d0610cc56
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26916
diff
changeset
|
318 virtual octave_idx_type xnumel (const octave_value_list&); |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9182
diff
changeset
|
319 |
26916
9cd4b045fe3d
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26655
diff
changeset
|
320 // FIXME: Do we really need all three of these versions of subsref? |
9cd4b045fe3d
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26655
diff
changeset
|
321 |
5759 | 322 virtual octave_value |
323 subsref (const std::string& type, | |
10313 | 324 const std::list<octave_value_list>& idx); |
3933 | 325 |
5759 | 326 virtual octave_value_list |
327 subsref (const std::string& type, | |
10313 | 328 const std::list<octave_value_list>& idx, |
329 int nargout); | |
3933 | 330 |
5759 | 331 virtual octave_value |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
332 subsref (const std::string& type, |
10313 | 333 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
|
334 bool auto_add); |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
335 |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
336 virtual octave_value |
5885 | 337 do_index_op (const octave_value_list& idx, bool resize_ok = false); |
2974 | 338 |
9147
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
339 virtual void assign (const std::string&, const octave_value&) { } |
5579998f8acf
Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents:
9010
diff
changeset
|
340 |
5759 | 341 virtual octave_value |
342 subsasgn (const std::string& type, | |
10313 | 343 const std::list<octave_value_list>& idx, |
344 const octave_value& rhs); | |
2376 | 345 |
12171
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
346 virtual octave_value |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
12125
diff
changeset
|
347 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
|
348 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
|
349 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
|
350 |
29569
29a1f8fd8ee6
move idx_vector classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
29478
diff
changeset
|
351 virtual octave::idx_vector index_vector (bool require_integers = false) const; |
2376 | 352 |
10181
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
353 virtual dim_vector dims (void) const { return dim_vector (); } |
4559 | 354 |
5759 | 355 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
|
356 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
357 const dim_vector dv = dims (); |
5164 | 358 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
359 return dv(0); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
360 } |
4791 | 361 |
5759 | 362 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
|
363 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
364 const dim_vector dv = dims (); |
5602 | 365 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
366 return dv(1); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
367 } |
5604 | 368 |
10652
2f0fbfa4dd23
simplify octave_base_value::ndims
Jaroslav Hajek <highegg@gmail.com>
parents:
10651
diff
changeset
|
369 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
|
370 { return dims ().ndims (); } |
4567 | 371 |
5759 | 372 virtual octave_idx_type numel (void) const { return dims ().numel (); } |
4593 | 373 |
29654
d13d090cb03a
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29476
diff
changeset
|
374 virtual std::size_t byte_size (void) const { return 0; } |
4915 | 375 |
5759 | 376 virtual octave_idx_type nnz (void) const; |
2376 | 377 |
5759 | 378 virtual octave_idx_type nzmax (void) const; |
379 | |
5900 | 380 virtual octave_idx_type nfields (void) const; |
381 | |
5759 | 382 virtual octave_value reshape (const dim_vector&) const; |
3351 | 383 |
5759 | 384 virtual octave_value permute (const Array<int>& vec, bool = false) const; |
2376 | 385 |
5759 | 386 virtual octave_value resize (const dim_vector&, bool fill = false) const; |
2376 | 387 |
5785 | 388 virtual MatrixType matrix_type (void) const; |
389 | |
390 virtual MatrixType matrix_type (const MatrixType& typ) const; | |
391 | |
5759 | 392 virtual bool is_defined (void) const { return false; } |
4505 | 393 |
29353
715344f405f0
improve handling of nan, infinite value, and empty ranges (bug #59229)
John W. Eaton <jwe@octave.org>
parents:
29234
diff
changeset
|
394 virtual bool is_storable (void) const { return true; } |
715344f405f0
improve handling of nan, infinite value, and empty ranges (bug #59229)
John W. Eaton <jwe@octave.org>
parents:
29234
diff
changeset
|
395 |
30852
95725e6ad9c1
restore part of the old octave_range class as octave_legacy_range
John W. Eaton <jwe@octave.org>
parents:
30835
diff
changeset
|
396 virtual bool is_legacy_object (void) const { return false; } |
95725e6ad9c1
restore part of the old octave_range class as octave_legacy_range
John W. Eaton <jwe@octave.org>
parents:
30835
diff
changeset
|
397 |
23577
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
398 bool isempty (void) const { return (dims ().any_zero ()); } |
2376 | 399 |
24657
dd19b0b9a9a1
allow empty strings to be edited (bug #51848)
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
400 bool is_zero_by_zero (void) const { return dims().zero_by_zero (); } |
dd19b0b9a9a1
allow empty strings to be edited (bug #51848)
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
401 |
23576
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23575
diff
changeset
|
402 virtual bool iscell (void) const { return false; } |
2376 | 403 |
23575
e95738a119da
maint: Deprecate is_cellstr and replace with iscellstr.
Rik <rik@octave.org>
parents:
23502
diff
changeset
|
404 virtual bool iscellstr (void) const { return false; } |
6116 | 405 |
5759 | 406 virtual bool is_real_scalar (void) const { return false; } |
4587 | 407 |
5759 | 408 virtual bool is_real_matrix (void) const { return false; } |
409 | |
410 virtual bool is_complex_scalar (void) const { return false; } | |
2376 | 411 |
5759 | 412 virtual bool is_complex_matrix (void) const { return false; } |
413 | |
5881 | 414 virtual bool is_bool_scalar (void) const { return false; } |
415 | |
5759 | 416 virtual bool is_bool_matrix (void) const { return false; } |
5279 | 417 |
5759 | 418 virtual bool is_char_matrix (void) const { return false; } |
2376 | 419 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
420 virtual bool is_diag_matrix (void) const { return false; } |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
421 |
8371
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8366
diff
changeset
|
422 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
|
423 |
5759 | 424 virtual bool is_string (void) const { return false; } |
2376 | 425 |
5759 | 426 virtual bool is_sq_string (void) const { return false; } |
4643 | 427 |
5759 | 428 virtual bool is_range (void) const { return false; } |
3977 | 429 |
23584
7ed6b258db91
maint: Deprecate is_map and replace with isstruct.
Rik <rik@octave.org>
parents:
23583
diff
changeset
|
430 virtual bool isstruct (void) const { return false; } |
5759 | 431 |
23587
0c468af9dc00
maint: Deprecate is_object and replace with isobject.
Rik <rik@octave.org>
parents:
23586
diff
changeset
|
432 virtual bool isobject (void) const { return false; } |
7336 | 433 |
23683
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
434 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
|
435 |
23865
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
436 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
|
437 |
19110
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
438 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
|
439 |
23838
6e0fd7e3c262
Fix argument lookup in '+' package functions (Bug #51532).
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
440 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
|
441 |
23578
7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
Rik <rik@octave.org>
parents:
23577
diff
changeset
|
442 virtual bool isjava (void) const { return false; } |
15770 | 443 |
5759 | 444 virtual bool is_cs_list (void) const { return false; } |
2376 | 445 |
5759 | 446 virtual bool is_magic_colon (void) const { return false; } |
2376 | 447 |
5759 | 448 virtual bool is_all_va_args (void) const { return false; } |
2376 | 449 |
5759 | 450 virtual octave_value all (int = 0) const; |
451 | |
452 virtual octave_value any (int = 0) const; | |
2376 | 453 |
9685 | 454 virtual builtin_type_t builtin_type (void) const { return btyp_unknown; } |
455 | |
5895 | 456 virtual bool is_double_type (void) const { return false; } |
457 | |
458 virtual bool is_single_type (void) const { return false; } | |
459 | |
23585
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23584
diff
changeset
|
460 virtual bool isfloat (void) const { return false; } |
7576 | 461 |
5895 | 462 virtual bool is_int8_type (void) const { return false; } |
463 | |
464 virtual bool is_int16_type (void) const { return false; } | |
465 | |
466 virtual bool is_int32_type (void) const { return false; } | |
467 | |
468 virtual bool is_int64_type (void) const { return false; } | |
469 | |
470 virtual bool is_uint8_type (void) const { return false; } | |
471 | |
472 virtual bool is_uint16_type (void) const { return false; } | |
473 | |
474 virtual bool is_uint32_type (void) const { return false; } | |
475 | |
476 virtual bool is_uint64_type (void) const { return false; } | |
477 | |
23579
c20a0fa91c0c
maint: Deprecate is_bool_type and replace with islogical.
Rik <rik@octave.org>
parents:
23578
diff
changeset
|
478 virtual bool islogical (void) const { return false; } |
3209 | 479 |
23580
2230f9e10fb3
maint: Deprecate is_integer_type and replace with isinteger.
Rik <rik@octave.org>
parents:
23579
diff
changeset
|
480 virtual bool isinteger (void) const { return false; } |
6223 | 481 |
23582
0cc2011d800e
maint: Deprecate is_real_type and replace with isreal.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
482 virtual bool isreal (void) const { return false; } |
2376 | 483 |
23581
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23580
diff
changeset
|
484 virtual bool iscomplex (void) const { return false; } |
2376 | 485 |
486 // Would be nice to get rid of the next four functions: | |
487 | |
5759 | 488 virtual bool is_scalar_type (void) const { return false; } |
2376 | 489 |
5759 | 490 virtual bool is_matrix_type (void) const { return false; } |
2376 | 491 |
23586
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
492 virtual bool isnumeric (void) const { return false; } |
2376 | 493 |
23583
b7747a2c88b2
maint: Deprecate is_sparse_type and replace with issparse.
Rik <rik@octave.org>
parents:
23582
diff
changeset
|
494 virtual bool issparse (void) const { return false; } |
5631 | 495 |
5759 | 496 virtual bool is_true (void) const { return false; } |
497 | |
28588
ee9b1081471f
allow integer constants > flintmax to be represented exactly (bug #45945)
John W. Eaton <jwe@octave.org>
parents:
28444
diff
changeset
|
498 virtual bool is_magic_int (void) const { return false; } |
ee9b1081471f
allow integer constants > flintmax to be represented exactly (bug #45945)
John W. Eaton <jwe@octave.org>
parents:
28444
diff
changeset
|
499 |
23589
63950abd2f81
maint: Deprecate is_null_type and replace with isnull.
Rik <rik@octave.org>
parents:
23588
diff
changeset
|
500 virtual bool isnull (void) const { return false; } |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
7885
diff
changeset
|
501 |
5759 | 502 virtual bool is_constant (void) const { return false; } |
2376 | 503 |
5759 | 504 virtual bool is_function_handle (void) const { return false; } |
2376 | 505 |
13241
2a8dcb5b3a00
improve default indexing for objects
John W. Eaton <jwe@octave.org>
parents:
12171
diff
changeset
|
506 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
|
507 |
5759 | 508 virtual bool is_inline_function (void) const { return false; } |
2974 | 509 |
5759 | 510 virtual bool is_function (void) const { return false; } |
4954 | 511 |
7336 | 512 virtual bool is_user_script (void) const { return false; } |
513 | |
514 virtual bool is_user_function (void) const { return false; } | |
515 | |
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
|
516 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
|
517 |
5759 | 518 virtual bool is_builtin_function (void) const { return false; } |
2974 | 519 |
5759 | 520 virtual bool is_dld_function (void) const { return false; } |
3325 | 521 |
5864 | 522 virtual bool is_mex_function (void) const { return false; } |
523 | |
7876
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
524 virtual void erase_subfunctions (void) { } |
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7789
diff
changeset
|
525 |
5759 | 526 virtual short int short_value (bool = false, bool = false) const; |
4254 | 527 |
5759 | 528 virtual unsigned short int ushort_value (bool = false, bool = false) const; |
4254 | 529 |
5759 | 530 virtual int int_value (bool = false, bool = false) const; |
3202 | 531 |
5759 | 532 virtual unsigned int uint_value (bool = false, bool = false) const; |
4254 | 533 |
5759 | 534 virtual int nint_value (bool = false) const; |
3202 | 535 |
5759 | 536 virtual long int long_value (bool = false, bool = false) const; |
4254 | 537 |
5759 | 538 virtual unsigned long int ulong_value (bool = false, bool = false) const; |
4254 | 539 |
16323
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
540 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
|
541 |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
15770
diff
changeset
|
542 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
|
543 |
5759 | 544 virtual double double_value (bool = false) const; |
2376 | 545 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
546 virtual float float_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
547 |
5759 | 548 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
|
549 { return double_value (frc_str_conv); } |
2376 | 550 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
551 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
|
552 { return float_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
553 |
5759 | 554 virtual Cell cell_value (void) const; |
3351 | 555 |
5759 | 556 virtual Matrix matrix_value (bool = false) const; |
3145 | 557 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
558 virtual FloatMatrix float_matrix_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
559 |
5759 | 560 virtual NDArray array_value (bool = false) const; |
4505 | 561 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
562 virtual FloatNDArray float_array_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
563 |
5759 | 564 virtual Complex complex_value (bool = false) const; |
2376 | 565 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
566 virtual FloatComplex float_complex_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
567 |
5759 | 568 virtual ComplexMatrix complex_matrix_value (bool = false) const; |
2376 | 569 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
570 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
|
571 |
5759 | 572 virtual ComplexNDArray complex_array_value (bool = false) const; |
4550 | 573 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
574 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
|
575 |
5943 | 576 virtual bool bool_value (bool = false) const; |
4550 | 577 |
5943 | 578 virtual boolMatrix bool_matrix_value (bool = false) const; |
4550 | 579 |
5943 | 580 virtual boolNDArray bool_array_value (bool = false) const; |
4550 | 581 |
5759 | 582 virtual charMatrix char_matrix_value (bool force = false) const; |
583 | |
584 virtual charNDArray char_array_value (bool = false) const; | |
2376 | 585 |
5759 | 586 virtual SparseMatrix sparse_matrix_value (bool = false) const; |
4550 | 587 |
5759 | 588 virtual SparseComplexMatrix sparse_complex_matrix_value (bool = false) const; |
5164 | 589 |
5759 | 590 virtual SparseBoolMatrix sparse_bool_matrix_value (bool = false) const; |
5164 | 591 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
592 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
|
593 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
594 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
|
595 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
596 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
|
597 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
598 virtual FloatComplexDiagMatrix |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
599 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
|
600 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8734
diff
changeset
|
601 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
|
602 |
5759 | 603 virtual octave_int8 int8_scalar_value (void) const; |
5164 | 604 |
5759 | 605 virtual octave_int16 int16_scalar_value (void) const; |
4910 | 606 |
5759 | 607 virtual octave_int32 int32_scalar_value (void) const; |
608 | |
609 virtual octave_int64 int64_scalar_value (void) const; | |
4910 | 610 |
5759 | 611 virtual octave_uint8 uint8_scalar_value (void) const; |
4910 | 612 |
5759 | 613 virtual octave_uint16 uint16_scalar_value (void) const; |
4910 | 614 |
5759 | 615 virtual octave_uint32 uint32_scalar_value (void) const; |
4910 | 616 |
5759 | 617 virtual octave_uint64 uint64_scalar_value (void) const; |
4910 | 618 |
5759 | 619 virtual int8NDArray int8_array_value (void) const; |
4910 | 620 |
5759 | 621 virtual int16NDArray int16_array_value (void) const; |
4910 | 622 |
5759 | 623 virtual int32NDArray int32_array_value (void) const; |
4906 | 624 |
5759 | 625 virtual int64NDArray int64_array_value (void) const; |
4906 | 626 |
5759 | 627 virtual uint8NDArray uint8_array_value (void) const; |
4906 | 628 |
5759 | 629 virtual uint16NDArray uint16_array_value (void) const; |
4906 | 630 |
5759 | 631 virtual uint32NDArray uint32_array_value (void) const; |
4906 | 632 |
5759 | 633 virtual uint64NDArray uint64_array_value (void) const; |
4906 | 634 |
20990
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
635 virtual string_vector string_vector_value (bool pad = false) const; |
4906 | 636 |
5759 | 637 virtual std::string string_value (bool force = false) const; |
4906 | 638 |
8732 | 639 virtual Array<std::string> cellstr_value (void) const; |
640 | |
30835
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
641 virtual octave::range<double> range_value (void) const; |
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
642 |
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
643 // For now, disable all but range<double>. |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
644 |
30835
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
645 #if 0 |
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
646 |
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
647 virtual octave::range<float> float_range_value (void) const; |
2376 | 648 |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
649 virtual octave::range<octave_int8> int8_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
650 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
651 virtual octave::range<octave_int16> int16_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
652 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
653 virtual octave::range<octave_int32> int32_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
654 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
655 virtual octave::range<octave_int64> int64_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
656 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
657 virtual octave::range<octave_uint8> uint8_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
658 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
659 virtual octave::range<octave_uint16> uint16_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
660 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
661 virtual octave::range<octave_uint32> uint32_range_value (void) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
662 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28642
diff
changeset
|
663 virtual octave::range<octave_uint64> uint64_range_value (void) const; |
2376 | 664 |
30835
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
665 #endif |
2989202f92f8
only allow range<FLOAT> to be instantiated
John W. Eaton <jwe@octave.org>
parents:
30762
diff
changeset
|
666 |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
667 virtual octave_map map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
668 |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
669 virtual octave_scalar_map scalar_map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
670 |
5759 | 671 virtual string_vector map_keys (void) const; |
2376 | 672 |
31260
c5c8bf50449c
Improve performance of isfield from linear time to constant time (bug #58105)
Arun Giridhar <arungiridhar@gmail.com>
parents:
31138
diff
changeset
|
673 virtual bool isfield (const std::string&) const; |
c5c8bf50449c
Improve performance of isfield from linear time to constant time (bug #58105)
Arun Giridhar <arungiridhar@gmail.com>
parents:
31138
diff
changeset
|
674 |
29654
d13d090cb03a
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29476
diff
changeset
|
675 virtual std::size_t nparents (void) const; |
9151 | 676 |
677 virtual std::list<std::string> parent_class_name_list (void) const; | |
678 | |
679 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
|
680 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
681 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
|
682 { return nullptr; } |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8950
diff
changeset
|
683 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
684 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
|
685 { return nullptr; } |
9767
0df32e0b2074
fix base class field assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
9743
diff
changeset
|
686 |
19103
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
687 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
|
688 { return false; } |
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
689 |
23881
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
690 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
|
691 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
692 virtual octave_function * function_value (bool silent = false); |
3933 | 693 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
694 virtual octave_user_function * user_function_value (bool silent = false); |
4645 | 695 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
696 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
|
697 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
698 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
|
699 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
700 virtual octave_fcn_handle * fcn_handle_value (bool silent = false); |
4643 | 701 |
5759 | 702 virtual octave_value_list list_value (void) const; |
4343 | 703 |
5759 | 704 virtual octave_value convert_to_str (bool pad = false, bool force = false, |
10313 | 705 char type = '\'') const; |
5759 | 706 virtual octave_value |
707 convert_to_str_internal (bool pad, bool force, char type) const; | |
4933 | 708 |
5759 | 709 virtual void convert_to_row_or_column_vector (void); |
2882 | 710 |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
711 // 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
|
712 // conversions. |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
713 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
714 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
|
715 |
5759 | 716 virtual bool print_as_scalar (void) const { return false; } |
2376 | 717 |
18416
bcd71a2531d3
Support disp/display overloading in classdef
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18316
diff
changeset
|
718 virtual void print (std::ostream& os, bool pr_as_read_syntax = false); |
2376 | 719 |
5759 | 720 virtual void |
721 print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; | |
4604 | 722 |
5759 | 723 virtual bool |
724 print_name_tag (std::ostream& os, const std::string& name) const; | |
2901 | 725 |
5759 | 726 virtual void |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
727 print_with_name (std::ostream& output_buf, const std::string& name, |
10313 | 728 bool print_padding = true); |
2376 | 729 |
17870 | 730 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
|
731 |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24657
diff
changeset
|
732 virtual float_display_format get_edit_display_format (void) const; |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24657
diff
changeset
|
733 |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24657
diff
changeset
|
734 virtual std::string edit_display (const float_display_format&, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24657
diff
changeset
|
735 octave_idx_type, octave_idx_type) const |
24643
78aff6f14227
more variable editor improvements; allow more variable types to be edited
John W. Eaton <jwe@octave.org>
parents:
24624
diff
changeset
|
736 { return "#VAL"; } |
78aff6f14227
more variable editor improvements; allow more variable types to be edited
John W. Eaton <jwe@octave.org>
parents:
24624
diff
changeset
|
737 |
5759 | 738 virtual void print_info (std::ostream& os, const std::string& prefix) const; |
3933 | 739 |
6974 | 740 virtual bool save_ascii (std::ostream& os); |
4687 | 741 |
5759 | 742 virtual bool load_ascii (std::istream& is); |
4687 | 743 |
26399
586413770c7f
pass save_as_floats by value in octave_value save_binary functions
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
744 virtual bool save_binary (std::ostream& os, bool save_as_floats); |
4687 | 745 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
746 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
|
747 octave::mach_info::float_format fmt); |
4687 | 748 |
5759 | 749 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
|
750 save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats); |
4687 | 751 |
5759 | 752 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
|
753 load_hdf5 (octave_hdf5_id loc_id, const char *name); |
4687 | 754 |
5759 | 755 virtual int |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
23012
diff
changeset
|
756 write (octave::stream& os, int block_size, |
10313 | 757 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
|
758 octave::mach_info::float_format flt_fmt) const; |
5759 | 759 |
30232
a2936935c7c8
attempt to limit possible const_cast damage
John W. Eaton <jwe@octave.org>
parents:
30148
diff
changeset
|
760 virtual const void * mex_get_data (void) const { return nullptr; } |
5900 | 761 |
30232
a2936935c7c8
attempt to limit possible const_cast damage
John W. Eaton <jwe@octave.org>
parents:
30148
diff
changeset
|
762 virtual const octave_idx_type * mex_get_ir (void) const { return nullptr; } |
5900 | 763 |
30232
a2936935c7c8
attempt to limit possible const_cast damage
John W. Eaton <jwe@octave.org>
parents:
30148
diff
changeset
|
764 virtual const octave_idx_type * mex_get_jc (void) const { return nullptr; } |
5900 | 765 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
766 virtual mxArray * as_mxArray (bool interleaved) const; |
5900 | 767 |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
768 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
|
769 |
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
|
770 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
|
771 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
772 virtual octave_value sort (octave_idx_type dim = 0, |
10313 | 773 sortmode mode = ASCENDING) const; |
30390
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30232
diff
changeset
|
774 virtual octave_value sort (Array<octave_idx_type>& sidx, |
10313 | 775 octave_idx_type dim = 0, |
776 sortmode mode = ASCENDING) const; | |
7433 | 777 |
23588
0549061d35b9
maint: Deprecate is_sorted and replace with issorted.
Rik <rik@octave.org>
parents:
23587
diff
changeset
|
778 virtual sortmode issorted (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
779 |
8733
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8732
diff
changeset
|
780 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
|
781 sort_rows_idx (sortmode mode = ASCENDING) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
782 |
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
|
783 virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const; |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
784 |
7489
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
785 virtual void lock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
786 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
787 virtual void unlock (void); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
788 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
789 virtual bool islocked (void) const { return false; } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
790 |
26655
cca0548f7b86
refactor calling object destructor
John W. Eaton <jwe@octave.org>
parents:
26527
diff
changeset
|
791 virtual void call_object_destructor (void) { } |
cca0548f7b86
refactor calling object destructor
John W. Eaton <jwe@octave.org>
parents:
26527
diff
changeset
|
792 |
23680
ef71711f6d64
rework __dump_symbol_table__ function
John W. Eaton <jwe@octave.org>
parents:
23626
diff
changeset
|
793 virtual octave_value dump (void) const; |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
794 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
795 // Standard mappers. Register new ones here. |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
796 enum unary_mapper_t |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
797 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
798 umap_abs, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
799 umap_acos, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
800 umap_acosh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
801 umap_angle, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
802 umap_arg, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
803 umap_asin, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
804 umap_asinh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
805 umap_atan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
806 umap_atanh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
807 umap_cbrt, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
808 umap_ceil, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
809 umap_conj, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
810 umap_cos, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
811 umap_cosh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
812 umap_erf, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
813 umap_erfinv, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
814 umap_erfcinv, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
815 umap_erfc, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
816 umap_erfcx, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
817 umap_erfi, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
818 umap_dawson, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
819 umap_exp, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
820 umap_expm1, |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
20990
diff
changeset
|
821 umap_isfinite, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
822 umap_fix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
823 umap_floor, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
824 umap_gamma, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
825 umap_imag, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
826 umap_isinf, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
827 umap_isna, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
828 umap_isnan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
829 umap_lgamma, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
830 umap_log, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
831 umap_log2, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
832 umap_log10, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
833 umap_log1p, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
834 umap_real, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
835 umap_round, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
836 umap_roundb, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
837 umap_signum, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
838 umap_sin, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
839 umap_sinh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
840 umap_sqrt, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
841 umap_tan, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
842 umap_tanh, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
843 umap_xisalnum, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
844 umap_xisalpha, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
845 umap_xisascii, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
846 umap_xiscntrl, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
847 umap_xisdigit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
848 umap_xisgraph, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
849 umap_xislower, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
850 umap_xisprint, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
851 umap_xispunct, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
852 umap_xisspace, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
853 umap_xisupper, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
854 umap_xisxdigit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
855 umap_xsignbit, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
856 umap_xtolower, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
857 umap_xtoupper, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
858 umap_unknown, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
859 num_unary_mappers = umap_unknown |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
860 }; |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
861 |
9812
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9790
diff
changeset
|
862 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
|
863 |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
864 // 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
|
865 // 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
|
866 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
867 // 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
|
868 // 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
|
869 virtual octave_value |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
870 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
|
871 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
872 // 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
|
873 // 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
|
874 // Never error. |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
875 virtual bool |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
876 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
|
877 |
20097
1f9ed81bd173
maint: Fix spelling and grammar mistakes in docs and comments (bug #44878)
Rafael Laboissiere <rafael@laboissiere.net>
parents:
19863
diff
changeset
|
878 // 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
|
879 // 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
|
880 // 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
|
881 virtual bool |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10652
diff
changeset
|
882 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
|
883 |
5759 | 884 protected: |
885 | |
886 // This should only be called for derived types. | |
887 | |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
888 OCTINTERP_API octave_value |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
889 numeric_assign (const std::string& type, |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
890 const std::list<octave_value_list>& idx, |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
891 const octave_value& rhs); |
5759 | 892 |
893 void reset_indent_level (void) const | |
30148
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
894 { s_curr_print_indent_level = 0; } |
5759 | 895 |
896 void increment_indent_level (void) const | |
30148
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
897 { s_curr_print_indent_level += 2; } |
5759 | 898 |
899 void decrement_indent_level (void) const | |
30148
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
900 { s_curr_print_indent_level -= 2; } |
5759 | 901 |
902 int current_print_indent_level (void) const | |
30148
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
903 { return s_curr_print_indent_level; } |
5759 | 904 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
905 OCTINTERP_API void indent (std::ostream& os) const; |
5759 | 906 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
907 OCTINTERP_API void newline (std::ostream& os) const; |
5759 | 908 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
909 OCTINTERP_API void reset (void) const; |
5759 | 910 |
30139
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
911 // A reference count. |
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
912 // NOTE: the declaration is octave_idx_type because with 64-bit indexing, |
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
913 // it is well possible to have more than MAX_INT copies of a single value |
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
914 // (think of an empty cell array with >2G elements). |
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
915 octave::refcount<octave_idx_type> count; |
c789e728d57a
Backed out changeset 938794bc82b7
John W. Eaton <jwe@octave.org>
parents:
30133
diff
changeset
|
916 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
917 OCTINTERP_API static const char * get_umap_name (unary_mapper_t); |
2376 | 918 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
919 OCTINTERP_API void warn_load (const char *type) const; |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
920 OCTINTERP_API 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
|
921 |
15501
814c4b0d5c49
make numeric mapper functions throw error for char args (bug #37535)
John W. Eaton <jwe@octave.org>
parents:
15487
diff
changeset
|
922 private: |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
923 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28646
diff
changeset
|
924 OCTINTERP_API void wrong_type_arg_error (void) const; |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20681
diff
changeset
|
925 |
30148
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
926 //-------- |
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
927 |
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
928 static int s_curr_print_indent_level; |
870687a59e96
maint: use "s_" prefix for static variables in class octave_base_value.
Rik <rik@octave.org>
parents:
30139
diff
changeset
|
929 static bool s_beginning_of_line; |
5759 | 930 |
931 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA | |
2376 | 932 }; |
933 | |
30750
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
934 class |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
935 OCTINTERP_API |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
936 octave_base_dld_value : public octave_base_value |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
937 { |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
938 public: |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
939 |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
940 octave_base_dld_value (void) = default; |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
941 |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
942 ~octave_base_dld_value (void) |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
943 { |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
944 m_containing_dynamic_library.delete_later (); |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
945 } |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
946 |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
947 octave_base_dld_value (const octave_base_dld_value&) = default; |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
948 |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
949 private: |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
950 |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
951 octave::auto_shlib m_containing_dynamic_library; |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
952 }; |
b92316e295a2
new class to help manage octave_value reps for dynamically loaded files
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
953 |
30801
568bddf0215e
deprecate sparse_auto_mutate function and internal variable
John W. Eaton <jwe@octave.org>
parents:
30763
diff
changeset
|
954 OCTAVE_DEPRECATED (8, "Vsparse_auto_mutate is obsolete and is now always false") |
10612
09e244649f50
Export symbol Vsparse_auto_mutate
Michael Goffioul <michael.goffioul@gmail.com>
parents:
10544
diff
changeset
|
955 extern OCTINTERP_API bool Vsparse_auto_mutate; |
7193 | 956 |
18314
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
957 // 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
|
958 // 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
|
959 // interpreter. |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
960 extern OCTINTERP_API octave_value |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
961 make_idx_args (const std::string& type, |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
962 const std::list<octave_value_list>& idx, |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
963 const std::string& who); |
06eb893b9db6
Implement subsref overloading in classdef.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18130
diff
changeset
|
964 |
26525
0d3eca5955dc
Backed out changeset 920a4ad8043b (bug #54995)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
965 // Tells whether some regular octave_value_base methods are being called from |
0d3eca5955dc
Backed out changeset 920a4ad8043b (bug #54995)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
966 // within the "builtin" function. |
0d3eca5955dc
Backed out changeset 920a4ad8043b (bug #54995)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
967 extern OCTINTERP_API bool called_from_builtin (void); |
0d3eca5955dc
Backed out changeset 920a4ad8043b (bug #54995)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
968 |
2376 | 969 #endif |