Mercurial > hg > octave-lyh
annotate libinterp/interp-core/oct-obj.h @ 16660:cbb1bb7a5c3d
Added tag ss-3-7-5 for changeset 608e307b4914
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 May 2013 05:23:53 -0400 |
parents | 1249a615c91b |
children |
rev | line source |
---|---|
498 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
13917
diff
changeset
|
3 Copyright (C) 1994-2012 John W. Eaton |
8580
188d38a553c7
further indexing optimization touches
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
4 Copyright (C) 2009 VZLU Prague |
498 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
498 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
498 | 21 |
22 */ | |
23 | |
504 | 24 #if !defined (octave_oct_obj_h) |
25 #define octave_oct_obj_h 1 | |
26 | |
1968 | 27 #include <string> |
4591 | 28 #include <vector> |
1968 | 29 |
2970 | 30 #include "oct-alloc.h" |
2943 | 31 #include "str-vec.h" |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
32 #include "Array.h" |
498 | 33 |
2369 | 34 #include "ov.h" |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
35 #include "Cell.h" |
498 | 36 |
737 | 37 class |
6109 | 38 OCTINTERP_API |
2872 | 39 octave_value_list |
508 | 40 { |
41 public: | |
42 | |
2086 | 43 octave_value_list (void) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
44 : data (), names () { } |
1968 | 45 |
9545
8670e55078fd
allow constructing octave_value_list from size
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
46 explicit octave_value_list (octave_idx_type n) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
47 : data (dim_vector (1, n)), names () { } |
9545
8670e55078fd
allow constructing octave_value_list from size
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
48 |
5275 | 49 octave_value_list (octave_idx_type n, const octave_value& val) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
50 : data (dim_vector (1, n), val), names () { } |
511 | 51 |
2086 | 52 octave_value_list (const octave_value& tc) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
53 : data (dim_vector (1, 1), tc), names () { } |
1968 | 54 |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
55 octave_value_list (const Array<octave_value>& d) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
56 : data (d.as_row ()), names () { } |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
57 |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
58 octave_value_list (const Cell& tc) |
11581
6006ca07410d
another data member initialization fix
John W. Eaton <jwe@octave.org>
parents:
11574
diff
changeset
|
59 : data (tc.as_row ()), names () { } |
8546
3d8a914c580e
improve parser indexed assigment code
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
60 |
2086 | 61 octave_value_list (const octave_value_list& obj) |
4150 | 62 : data (obj.data), names (obj.names) { } |
508 | 63 |
8580
188d38a553c7
further indexing optimization touches
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
64 // Concatenation constructor. |
188d38a553c7
further indexing optimization touches
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
65 octave_value_list (const std::list<octave_value_list>&); |
188d38a553c7
further indexing optimization touches
Jaroslav Hajek <highegg@gmail.com>
parents:
8579
diff
changeset
|
66 |
4189 | 67 ~octave_value_list (void) { } |
68 | |
2086 | 69 octave_value_list& operator = (const octave_value_list& obj) |
508 | 70 { |
1968 | 71 if (this != &obj) |
10313 | 72 { |
73 data = obj.data; | |
74 names = obj.names; | |
75 } | |
1968 | 76 |
508 | 77 return *this; |
78 } | |
79 | |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
80 Array<octave_value> array_value (void) const { return data; } |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
81 |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
82 Cell cell_value (void) const { return array_value (); } |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
83 |
2872 | 84 // Assignment will resize on range errors. |
508 | 85 |
5275 | 86 octave_value& operator () (octave_idx_type n) { return elem (n); } |
1968 | 87 |
10075
84b0725f4b09
return class types by reference in const Array element access functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9545
diff
changeset
|
88 const octave_value& operator () (octave_idx_type n) const { return elem (n); } |
526 | 89 |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
90 octave_idx_type length (void) const { return data.length (); } |
2872 | 91 |
2951 | 92 bool empty (void) const { return length () == 0; } |
93 | |
14616
13cc11418393
improve handling of default resize fill value for arrays
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
94 void resize (octave_idx_type n, const octave_value& rfv = octave_value ()) |
11574
a83bad07f7e3
attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents:
11570
diff
changeset
|
95 { |
a83bad07f7e3
attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents:
11570
diff
changeset
|
96 data.resize (dim_vector (1, n), rfv); |
a83bad07f7e3
attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents:
11570
diff
changeset
|
97 } |
2872 | 98 |
99 octave_value_list& prepend (const octave_value& val); | |
100 | |
101 octave_value_list& append (const octave_value& val); | |
102 | |
103 octave_value_list& append (const octave_value_list& lst); | |
104 | |
105 octave_value_list& reverse (void); | |
106 | |
6335 | 107 octave_value_list |
10659
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
108 slice (octave_idx_type offset, octave_idx_type len, bool tags = false) const |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11581
diff
changeset
|
109 { |
10659
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
110 octave_value_list retval (data.linear_slice (offset, offset + len)); |
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
111 if (tags && len > 0 && names.length () > 0) |
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
112 retval.names = names.linear_slice (offset, std::min (len, names.length ())); |
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
113 |
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
114 return retval; |
8baff2aceabc
fix slicing value lists with name tags (bug #29960)
Jaroslav Hajek <highegg@gmail.com>
parents:
10350
diff
changeset
|
115 } |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
116 |
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
117 octave_value_list |
6335 | 118 splice (octave_idx_type offset, octave_idx_type len, |
10313 | 119 const octave_value_list& lst = octave_value_list ()) const; |
3195 | 120 |
2872 | 121 bool all_strings_p (void) const; |
1968 | 122 |
8455
fd11a08a9b31
disallow invalid {}-indexed assigments
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
123 bool all_scalars (void) const; |
fd11a08a9b31
disallow invalid {}-indexed assigments
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
124 |
10086
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
125 bool any_cell (void) const; |
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10075
diff
changeset
|
126 |
5846 | 127 bool has_magic_colon (void) const; |
128 | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14616
diff
changeset
|
129 string_vector make_argv (const std::string& = std::string ()) const; |
526 | 130 |
2943 | 131 void stash_name_tags (const string_vector& nm) { names = nm; } |
132 | |
133 string_vector name_tags (void) const { return names; } | |
134 | |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8455
diff
changeset
|
135 void make_storable_values (void); |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
8034
diff
changeset
|
136 |
10181
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
137 octave_value& xelem (octave_idx_type i) |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
138 { |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
139 return data.xelem (i); |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
140 } |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
141 |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
142 void clear (void) |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
143 { |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
144 data.clear (); |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
145 } |
a668fbd32e34
improve cellfun & avoid undefined values from builtins
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
146 |
526 | 147 private: |
508 | 148 |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
149 Array<octave_value> data; |
2872 | 150 |
2943 | 151 // This list of strings can be used to tag each element of data with |
152 // a name. By default, it is empty. | |
153 string_vector names; | |
154 | |
5275 | 155 octave_value& elem (octave_idx_type n) |
1968 | 156 { |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
157 if (n >= length ()) |
10313 | 158 resize (n + 1); |
4591 | 159 |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
160 return data(n); |
1968 | 161 } |
162 | |
10075
84b0725f4b09
return class types by reference in const Array element access functions
Jaroslav Hajek <highegg@gmail.com>
parents:
9545
diff
changeset
|
163 const octave_value& elem (octave_idx_type n) const |
8579
7e0f36dfefbe
implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
164 { return data(n); } |
13917
826f008c829b
* oct-obj.h, oct-obj.cc: Use macros to declare and define octave_allocator.
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
165 |
826f008c829b
* oct-obj.h, oct-obj.cc: Use macros to declare and define octave_allocator.
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
166 DECLARE_OCTAVE_ALLOCATOR |
508 | 167 }; |
498 | 168 |
15420
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
169 // Make it easy to build argument lists for built-in functions or for |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
170 // returning values. |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
171 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
172 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
173 ovl (const octave_value& a0) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
174 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
175 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
176 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
177 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
178 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
179 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
180 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
181 ovl (const octave_value& a0, const octave_value& a1) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
182 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
183 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
184 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
185 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
186 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
187 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
188 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
189 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
190 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
191 const octave_value& a2) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
192 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
193 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
194 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
195 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
196 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
197 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
198 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
199 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
200 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
201 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
202 const octave_value& a2, const octave_value& a3) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
203 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
204 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
205 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
206 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
207 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
208 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
209 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
210 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
211 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
212 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
213 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
214 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
215 const octave_value& a4) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
216 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
217 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
218 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
219 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
220 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
221 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
222 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
223 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
224 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
225 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
226 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
227 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
228 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
229 const octave_value& a4, const octave_value& a5) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
230 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
231 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
232 retval(5) = a5; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
233 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
234 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
235 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
236 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
237 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
238 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
239 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
240 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
241 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
242 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
243 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
244 const octave_value& a4, const octave_value& a5, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
245 const octave_value& a6) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
246 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
247 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
248 retval(6) = a6; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
249 retval(5) = a5; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
250 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
251 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
252 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
253 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
254 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
255 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
256 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
257 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
258 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
259 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
260 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
261 const octave_value& a4, const octave_value& a5, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
262 const octave_value& a6, const octave_value& a7) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
263 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
264 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
265 retval(7) = a7; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
266 retval(6) = a6; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
267 retval(5) = a5; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
268 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
269 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
270 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
271 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
272 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
273 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
274 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
275 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
276 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
277 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
278 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
279 const octave_value& a4, const octave_value& a5, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
280 const octave_value& a6, const octave_value& a7, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
281 const octave_value& a8) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
282 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
283 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
284 retval(8) = a8; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
285 retval(7) = a7; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
286 retval(6) = a6; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
287 retval(5) = a5; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
288 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
289 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
290 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
291 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
292 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
293 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
294 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
295 |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
296 inline octave_value_list |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
297 ovl (const octave_value& a0, const octave_value& a1, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
298 const octave_value& a2, const octave_value& a3, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
299 const octave_value& a4, const octave_value& a5, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
300 const octave_value& a6, const octave_value& a7, |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
301 const octave_value& a8, const octave_value& a9) |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
302 { |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
303 octave_value_list retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
304 retval(9) = a9; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
305 retval(8) = a8; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
306 retval(7) = a7; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
307 retval(6) = a6; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
308 retval(5) = a5; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
309 retval(4) = a4; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
310 retval(3) = a3; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
311 retval(2) = a2; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
312 retval(1) = a1; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
313 retval(0) = a0; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
314 return retval; |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
315 } |
1249a615c91b
call built-in functions directly in GUI callbacks
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
316 |
504 | 317 #endif |