Mercurial > octave
annotate libinterp/corefcn/mxarray.h @ 30122:8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
* mex.cc, mxarray.h: Use "m_" prefix for member variables in class
mxArray_base.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 06 Sep 2021 10:44:43 -0700 |
parents | 32f4357ac8d9 |
children | b8841fcd28c8 |
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 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
3 // Copyright (C) 2001-2021 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 //////////////////////////////////////////////////////////////////////// |
6686 | 25 |
26 /* | |
27 | |
28 Part of this code was originally distributed as part of Octave Forge under | |
29 the following terms: | |
30 | |
31 Author: Paul Kienzle | |
32 I grant this code to the public domain. | |
33 2001-03-22 | |
34 | |
35 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
36 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
37 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
38 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
39 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
40 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
41 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
42 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
43 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
44 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
45 SUCH DAMAGE. | |
46 | |
47 */ | |
48 | |
21241
bae38398f5f1
use consistent style for all liboctave and libinterp include guards
John W. Eaton <jwe@octave.org>
parents:
21151
diff
changeset
|
49 #if ! defined (octave_mxarray_h) |
bae38398f5f1
use consistent style for all liboctave and libinterp include guards
John W. Eaton <jwe@octave.org>
parents:
21151
diff
changeset
|
50 #define octave_mxarray_h 1 |
6686 | 51 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21241
diff
changeset
|
52 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21241
diff
changeset
|
53 |
28123
4963f23b145c
move mex type definitions to separate file
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
54 #include "mxtypes.h" |
6686 | 55 |
56 #if ! defined (MXARRAY_TYPEDEFS_ONLY) | |
57 | |
7417 | 58 #include <cstring> |
21151
bfd5e48c41a1
Rename local error in mex I/F from invalid_type_error to err_invalid_type.
Rik <rik@octave.org>
parents:
21066
diff
changeset
|
59 #include "error.h" |
7417 | 60 |
6686 | 61 class octave_value; |
23442
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
62 class dim_vector; |
6686 | 63 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
64 #define DO_MUTABLE_METHOD(RET_T, METHOD_CALL) \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
65 RET_T retval = m_rep->METHOD_CALL; \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
66 \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
67 if (m_rep->mutation_needed ()) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
68 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
69 maybe_mutate (); \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
70 retval = m_rep->METHOD_CALL; \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
71 } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
72 \ |
6686 | 73 return retval |
74 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
75 #define DO_VOID_MUTABLE_METHOD(METHOD_CALL) \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
76 m_rep->METHOD_CALL; \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
77 \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
78 if (m_rep->mutation_needed ()) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
79 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21568
diff
changeset
|
80 maybe_mutate (); \ |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
81 m_rep->METHOD_CALL; \ |
6686 | 82 } |
83 | |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
84 class OCTINTERP_API mxArray; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
85 |
21151
bfd5e48c41a1
Rename local error in mex I/F from invalid_type_error to err_invalid_type.
Rik <rik@octave.org>
parents:
21066
diff
changeset
|
86 // A class to provide the default implementation of some of the |
bfd5e48c41a1
Rename local error in mex I/F from invalid_type_error to err_invalid_type.
Rik <rik@octave.org>
parents:
21066
diff
changeset
|
87 // virtual functions declared in the mxArray class. |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
88 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
89 class OCTINTERP_API mxArray_base |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
90 { |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
91 protected: |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
92 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
93 OCTINTERP_API mxArray_base (bool interleaved); |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
94 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
95 public: |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
96 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
97 virtual mxArray_base * dup (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
98 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23697
diff
changeset
|
99 virtual mxArray * as_mxArray (void) const { return nullptr; } |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
100 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
101 virtual ~mxArray_base (void) = default; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
102 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
103 virtual bool is_octave_value (void) const { return false; } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
104 |
23576
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23457
diff
changeset
|
105 virtual int iscell (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
106 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
107 virtual int is_char (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
108 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
109 virtual int is_class (const char *name_arg) const |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
110 { |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
111 int retval = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
112 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
113 const char *cname = get_class_name (); |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
114 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
115 if (cname && name_arg) |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
116 retval = ! strcmp (cname, name_arg); |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
117 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
118 return retval; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
119 } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
120 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
121 virtual int is_complex (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
122 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
123 virtual int is_double (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
124 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
125 virtual int is_function_handle (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
126 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
127 virtual int is_int16 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
128 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
129 virtual int is_int32 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
130 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
131 virtual int is_int64 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
132 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
133 virtual int is_int8 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
134 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
135 virtual int is_logical (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
136 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
137 virtual int is_numeric (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
138 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
139 virtual int is_single (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
140 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
141 virtual int is_sparse (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
142 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
143 virtual int is_struct (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
144 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
145 virtual int is_uint16 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
146 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
147 virtual int is_uint32 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
148 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
149 virtual int is_uint64 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
150 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
151 virtual int is_uint8 (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
152 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
153 virtual int is_logical_scalar (void) const |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
154 { |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
155 return is_logical () && get_number_of_elements () == 1; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
156 } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
157 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
158 virtual int is_logical_scalar_true (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
159 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
160 virtual mwSize get_m (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
161 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
162 virtual mwSize get_n (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
163 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
164 virtual mwSize * get_dimensions (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
165 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
166 virtual mwSize get_number_of_dimensions (void) const = 0; |
6686 | 167 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
168 virtual void set_m (mwSize m) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
169 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
170 virtual void set_n (mwSize n) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
171 |
22471
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
172 virtual int set_dimensions (mwSize *dims_arg, mwSize ndims_arg) = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
173 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
174 virtual mwSize get_number_of_elements (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
175 |
23577
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
176 virtual int isempty (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
177 |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22453
diff
changeset
|
178 virtual bool is_scalar (void) const = 0; |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22453
diff
changeset
|
179 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
180 virtual mxClassID get_class_id (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
181 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
182 virtual const char * get_class_name (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
183 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
184 virtual void set_class_name (const char *name_arg) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
185 |
27956
2310164737b3
fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
26405
diff
changeset
|
186 // The following functions aren't pure virtual because they are only |
2310164737b3
fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
26405
diff
changeset
|
187 // valid for one type. Making them pure virtual would mean that they |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
188 // have to be implemented for all derived types, and all of those |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
189 // would need to throw errors instead of just doing it once here. |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
190 |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
191 virtual mxArray * |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
192 get_property (mwIndex /*idx*/, const char * /*pname*/) const |
23884
bd9e719f04cc
new mxGetProperty function for MEX API
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
193 { |
bd9e719f04cc
new mxGetProperty function for MEX API
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
194 return nullptr; |
bd9e719f04cc
new mxGetProperty function for MEX API
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
195 } |
bd9e719f04cc
new mxGetProperty function for MEX API
Piotr Held <pjheld@gmail.com>
parents:
23795
diff
changeset
|
196 |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
197 virtual void set_property (mwIndex /*idx*/, const char * /*pname*/, |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
198 const mxArray * /*pval*/) |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
199 { |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
200 err_invalid_type ("set_property"); |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
201 } |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
202 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
203 virtual mxArray * get_cell (mwIndex /*idx*/) const |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
204 { |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
205 err_invalid_type ("get_cell"); |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
206 } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
207 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
208 virtual void set_cell (mwIndex idx, mxArray *val) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
209 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
210 virtual double get_scalar (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
211 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
212 virtual void * get_data (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
213 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
214 virtual mxDouble * get_doubles (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
215 virtual mxSingle * get_singles (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
216 virtual mxInt8 * get_int8s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
217 virtual mxInt16 * get_int16s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
218 virtual mxInt32 * get_int32s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
219 virtual mxInt64 * get_int64s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
220 virtual mxUint8 * get_uint8s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
221 virtual mxUint16 * get_uint16s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
222 virtual mxUint32 * get_uint32s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
223 virtual mxUint64 * get_uint64s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
224 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
225 virtual mxComplexDouble * get_complex_doubles (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
226 virtual mxComplexSingle * get_complex_singles (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
227 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
228 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
229 virtual mxComplexInt8 * get_complex_int8s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
230 virtual mxComplexInt16 * get_complex_int16s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
231 virtual mxComplexInt32 * get_complex_int32s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
232 virtual mxComplexInt64 * get_complex_int64s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
233 virtual mxComplexUint8 * get_complex_uint8s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
234 virtual mxComplexUint16 * get_complex_uint16s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
235 virtual mxComplexUint32 * get_complex_uint32s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
236 virtual mxComplexUint64 * get_complex_uint64s (void) const = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
237 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
238 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
239 virtual void * get_imag_data (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
240 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
241 virtual void set_data (void *pr) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
242 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
243 virtual int set_doubles (mxDouble *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
244 virtual int set_singles (mxSingle *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
245 virtual int set_int8s (mxInt8 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
246 virtual int set_int16s (mxInt16 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
247 virtual int set_int32s (mxInt32 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
248 virtual int set_int64s (mxInt64 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
249 virtual int set_uint8s (mxUint8 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
250 virtual int set_uint16s (mxUint16 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
251 virtual int set_uint32s (mxUint32 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
252 virtual int set_uint64s (mxUint64 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
253 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
254 virtual int set_complex_doubles (mxComplexDouble *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
255 virtual int set_complex_singles (mxComplexSingle *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
256 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
257 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
258 virtual int set_complex_int8s (mxComplexInt8 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
259 virtual int set_complex_int16s (mxComplexInt16 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
260 virtual int set_complex_int32s (mxComplexInt32 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
261 virtual int set_complex_int64s (mxComplexInt64 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
262 virtual int set_complex_uint8s (mxComplexUint8 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
263 virtual int set_complex_uint16s (mxComplexUint16 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
264 virtual int set_complex_uint32s (mxComplexUint32 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
265 virtual int set_complex_uint64s (mxComplexUint64 *data) = 0; |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
266 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
267 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
268 virtual void set_imag_data (void *pi) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
269 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
270 virtual mwIndex * get_ir (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
271 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
272 virtual mwIndex * get_jc (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
273 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
274 virtual mwSize get_nzmax (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
275 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
276 virtual void set_ir (mwIndex *ir) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
277 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
278 virtual void set_jc (mwIndex *jc) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
279 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
280 virtual void set_nzmax (mwSize nzmax) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
281 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
282 virtual int add_field (const char *key) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
283 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
284 virtual void remove_field (int key_num) = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
285 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
286 virtual mxArray * get_field_by_number (mwIndex index, int key_num) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
287 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
288 virtual void |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
289 set_field_by_number (mwIndex index, int key_num, mxArray *val) = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
290 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
291 virtual int get_number_of_fields (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
292 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
293 virtual const char * get_field_name_by_number (int key_num) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
294 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
295 virtual int get_field_number (const char *key) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
296 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
297 virtual int get_string (char *buf, mwSize buflen) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
298 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
299 virtual char * array_to_string (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
300 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
301 virtual mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
302 |
29572
aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
303 virtual std::size_t get_element_size (void) const = 0; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
304 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
305 virtual bool mutation_needed (void) const { return false; } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
306 |
23795
980f39c3ab90
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23697
diff
changeset
|
307 virtual mxArray * mutate (void) const { return nullptr; } |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
308 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
309 virtual octave_value as_octave_value (void) const = 0; |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
310 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
311 protected: |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
312 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
313 mxArray_base (const mxArray_base&) = default; |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
314 |
29572
aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
315 std::size_t get_numeric_element_size (std::size_t size) const |
21151
bfd5e48c41a1
Rename local error in mex I/F from invalid_type_error to err_invalid_type.
Rik <rik@octave.org>
parents:
21066
diff
changeset
|
316 { |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
317 return (m_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
318 ? is_complex () ? 2 * size : size |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
319 : size); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
320 } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
321 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
322 OCTAVE_NORETURN void err_invalid_type (const char *op) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
323 { |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
324 error ("%s: invalid type for mxArray::%s", get_class_name (), op); |
21151
bfd5e48c41a1
Rename local error in mex I/F from invalid_type_error to err_invalid_type.
Rik <rik@octave.org>
parents:
21066
diff
changeset
|
325 } |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
326 |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
327 //-------- |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
328 |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
329 // If TRUE, we are using interleaved storage for complex numeric arrays. |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
330 bool m_interleaved; |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
331 |
6686 | 332 }; |
333 | |
334 // The main interface class. The representation can be based on an | |
335 // octave_value object or a separate object that tries to reproduce | |
336 // the semantics of mxArray objects in Matlab more directly. | |
337 | |
338 class mxArray | |
339 { | |
340 public: | |
341 | |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
342 OCTINTERP_API mxArray (bool interleaved, const octave_value& ov); |
6686 | 343 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
344 OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize ndims, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
345 const mwSize *dims, mxComplexity flag = mxREAL, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
346 bool init = true); |
6686 | 347 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
348 OCTINTERP_API mxArray (bool interleaved, mxClassID id, const dim_vector& dv, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
349 mxComplexity flag = mxREAL); |
6686 | 350 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
351 OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
352 mxComplexity flag = mxREAL, bool init = true); |
6686 | 353 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
354 OCTINTERP_API mxArray (bool interleaved, mxClassID id, double val); |
6686 | 355 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
356 OCTINTERP_API mxArray (bool interleaved, mxClassID id, mxLogical val); |
6686 | 357 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
358 OCTINTERP_API mxArray (bool interleaved, const char *str); |
6686 | 359 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
360 OCTINTERP_API mxArray (bool interleaved, mwSize m, const char **str); |
6686 | 361 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
362 OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
363 mwSize nzmax, mxComplexity flag = mxREAL); |
6686 | 364 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
365 OCTINTERP_API mxArray (bool interleaved, mwSize ndims, const mwSize *dims, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
366 int num_keys, const char **keys); |
6686 | 367 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
368 OCTINTERP_API mxArray (bool interleaved, const dim_vector& dv, int num_keys, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
369 const char **keys); |
6686 | 370 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
371 OCTINTERP_API mxArray (bool interleaved, mwSize m, mwSize n, int num_keys, |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
372 const char **keys); |
6686 | 373 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
374 OCTINTERP_API mxArray (bool interleaved, mwSize ndims, const mwSize *dims); |
6686 | 375 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
376 OCTINTERP_API mxArray (bool interleaved, const dim_vector& dv); |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
377 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
378 OCTINTERP_API mxArray (bool interleaved, mwSize m, mwSize n); |
6686 | 379 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
380 mxArray * dup (void) const |
6686 | 381 { |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
382 mxArray *retval = m_rep->as_mxArray (); |
6686 | 383 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
384 if (retval) |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
385 retval->set_name (m_name); |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
386 else |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
387 { |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
388 mxArray_base *new_rep = m_rep->dup (); |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
389 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
390 retval = new mxArray (new_rep, m_name); |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
391 } |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
392 |
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
393 return retval; |
6686 | 394 } |
395 | |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
396 // No copying! |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
397 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
398 mxArray (const mxArray&) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
399 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
400 mxArray& operator = (const mxArray&) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
401 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
402 OCTINTERP_API ~mxArray (void); |
6686 | 403 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
404 bool is_octave_value (void) const { return m_rep->is_octave_value (); } |
6686 | 405 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
406 int iscell (void) const { return m_rep->iscell (); } |
6686 | 407 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
408 int is_char (void) const { return m_rep->is_char (); } |
6686 | 409 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
410 int is_class (const char *name_arg) const { return m_rep->is_class (name_arg); } |
6686 | 411 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
412 int is_complex (void) const { return m_rep->is_complex (); } |
6686 | 413 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
414 int is_double (void) const { return m_rep->is_double (); } |
6686 | 415 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
416 int is_function_handle (void) const { return m_rep->is_function_handle (); } |
11100
cdf940db26a0
provide mxIsFunctionHandle MEX interface function
John W. Eaton <jwe@octave.org>
parents:
10317
diff
changeset
|
417 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
418 int is_int16 (void) const { return m_rep->is_int16 (); } |
6686 | 419 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
420 int is_int32 (void) const { return m_rep->is_int32 (); } |
6686 | 421 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
422 int is_int64 (void) const { return m_rep->is_int64 (); } |
6686 | 423 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
424 int is_int8 (void) const { return m_rep->is_int8 (); } |
6686 | 425 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
426 int is_logical (void) const { return m_rep->is_logical (); } |
6686 | 427 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
428 int is_numeric (void) const { return m_rep->is_numeric (); } |
6686 | 429 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
430 int is_single (void) const { return m_rep->is_single (); } |
6686 | 431 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
432 int is_sparse (void) const { return m_rep->is_sparse (); } |
6686 | 433 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
434 int is_struct (void) const { return m_rep->is_struct (); } |
6686 | 435 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
436 int is_uint16 (void) const { return m_rep->is_uint16 (); } |
6686 | 437 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
438 int is_uint32 (void) const { return m_rep->is_uint32 (); } |
6686 | 439 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
440 int is_uint64 (void) const { return m_rep->is_uint64 (); } |
6686 | 441 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
442 int is_uint8 (void) const { return m_rep->is_uint8 (); } |
6686 | 443 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
444 int is_logical_scalar (void) const { return m_rep->is_logical_scalar (); } |
6686 | 445 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
446 int is_logical_scalar_true (void) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
447 { return m_rep->is_logical_scalar_true (); } |
6686 | 448 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
449 mwSize get_m (void) const { return m_rep->get_m (); } |
6686 | 450 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
451 mwSize get_n (void) const { return m_rep->get_n (); } |
6686 | 452 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
453 mwSize * get_dimensions (void) const { return m_rep->get_dimensions (); } |
6686 | 454 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
455 mwSize get_number_of_dimensions (void) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
456 { return m_rep->get_number_of_dimensions (); } |
6686 | 457 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
458 void set_m (mwSize m) { DO_VOID_MUTABLE_METHOD (set_m (m)); } |
6686 | 459 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
460 void set_n (mwSize n) { DO_VOID_MUTABLE_METHOD (set_n (n)); } |
6686 | 461 |
22471
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
462 int set_dimensions (mwSize *dims_arg, mwSize ndims_arg) |
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
463 { DO_MUTABLE_METHOD (int, set_dimensions (dims_arg, ndims_arg)); } |
6686 | 464 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
465 mwSize get_number_of_elements (void) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
466 { return m_rep->get_number_of_elements (); } |
6686 | 467 |
23577
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
468 int isempty (void) const { return get_number_of_elements () == 0; } |
6686 | 469 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
470 bool is_scalar (void) const { return m_rep->is_scalar (); } |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22453
diff
changeset
|
471 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
472 const char * get_name (void) const { return m_name; } |
6686 | 473 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
474 OCTINTERP_API void set_name (const char *name); |
6686 | 475 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
476 mxClassID get_class_id (void) const { return m_rep->get_class_id (); } |
6686 | 477 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
478 const char * get_class_name (void) const { return m_rep->get_class_name (); } |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
479 |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
480 mxArray * get_property (mwIndex idx, const char *pname) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
481 { return m_rep->get_property (idx, pname); } |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
482 |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
483 void set_property (mwIndex idx, const char *pname, const mxArray *pval) |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
484 { m_rep->set_property (idx, pname, pval); } |
6686 | 485 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
486 void set_class_name (const char *name_arg) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
487 { DO_VOID_MUTABLE_METHOD (set_class_name (name_arg)); } |
6686 | 488 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
489 mxArray * get_cell (mwIndex idx) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
490 { DO_MUTABLE_METHOD (mxArray *, get_cell (idx)); } |
6686 | 491 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
492 void set_cell (mwIndex idx, mxArray *val) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
493 { DO_VOID_MUTABLE_METHOD (set_cell (idx, val)); } |
6686 | 494 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
495 double get_scalar (void) const { return m_rep->get_scalar (); } |
6686 | 496 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
497 void * get_data (void) const { DO_MUTABLE_METHOD (void *, get_data ()); } |
6686 | 498 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
499 mxDouble * get_doubles (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
500 { DO_MUTABLE_METHOD (mxDouble *, get_doubles ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
501 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
502 mxSingle * get_singles (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
503 { DO_MUTABLE_METHOD (mxSingle *, get_singles ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
504 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
505 mxInt8 * get_int8s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
506 { DO_MUTABLE_METHOD (mxInt8 *, get_int8s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
507 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
508 mxInt16 * get_int16s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
509 { DO_MUTABLE_METHOD (mxInt16 *, get_int16s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
510 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
511 mxInt32 * get_int32s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
512 { DO_MUTABLE_METHOD (mxInt32 *, get_int32s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
513 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
514 mxInt64 * get_int64s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
515 { DO_MUTABLE_METHOD (mxInt64 *, get_int64s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
516 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
517 mxUint8 * get_uint8s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
518 { DO_MUTABLE_METHOD (mxUint8 *, get_uint8s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
519 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
520 mxUint16 * get_uint16s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
521 { DO_MUTABLE_METHOD (mxUint16 *, get_uint16s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
522 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
523 mxUint32 * get_uint32s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
524 { DO_MUTABLE_METHOD (mxUint32 *, get_uint32s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
525 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
526 mxUint64 * get_uint64s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
527 { DO_MUTABLE_METHOD (mxUint64 *, get_uint64s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
528 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
529 mxComplexDouble * get_complex_doubles (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
530 { DO_MUTABLE_METHOD (mxComplexDouble *, get_complex_doubles ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
531 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
532 mxComplexSingle * get_complex_singles (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
533 { DO_MUTABLE_METHOD (mxComplexSingle *, get_complex_singles ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
534 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
535 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
536 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
537 mxComplexInt8 * get_complex_int8s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
538 { DO_MUTABLE_METHOD (mxComplexInt8 *, get_complex_int8s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
539 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
540 mxComplexInt16 * get_complex_int16s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
541 { DO_MUTABLE_METHOD (mxComplexInt16 *, get_complex_int16s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
542 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
543 mxComplexInt32 * get_complex_int32s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
544 { DO_MUTABLE_METHOD (mxComplexInt32 *, get_complex_int32s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
545 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
546 mxComplexInt64 * get_complex_int64s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
547 { DO_MUTABLE_METHOD (mxComplexInt64 *, get_complex_int64s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
548 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
549 mxComplexUint8 * get_complex_uint8s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
550 { DO_MUTABLE_METHOD (mxComplexUint8 *, get_complex_uint8s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
551 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
552 mxComplexUint16 * get_complex_uint16s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
553 { DO_MUTABLE_METHOD (mxComplexUint16 *, get_complex_uint16s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
554 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
555 mxComplexUint32 * get_complex_uint32s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
556 { DO_MUTABLE_METHOD (mxComplexUint32 *, get_complex_uint32s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
557 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
558 mxComplexUint64 * get_complex_uint64s (void) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
559 { DO_MUTABLE_METHOD (mxComplexUint64 *, get_complex_uint64s ()); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
560 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
561 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
562 void * get_imag_data (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
563 { DO_MUTABLE_METHOD (void *, get_imag_data ()); } |
6686 | 564 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
565 void set_data (void *pr) { DO_VOID_MUTABLE_METHOD (set_data (pr)); } |
6686 | 566 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
567 int set_doubles (mxDouble *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
568 { DO_MUTABLE_METHOD (int, set_doubles (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
569 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
570 int set_singles (mxSingle *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
571 { DO_MUTABLE_METHOD (int, set_singles (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
572 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
573 int set_int8s (mxInt8 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
574 { DO_MUTABLE_METHOD (int, set_int8s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
575 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
576 int set_int16s (mxInt16 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
577 { DO_MUTABLE_METHOD (int, set_int16s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
578 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
579 int set_int32s (mxInt32 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
580 { DO_MUTABLE_METHOD (int, set_int32s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
581 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
582 int set_int64s (mxInt64 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
583 { DO_MUTABLE_METHOD (int, set_int64s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
584 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
585 int set_uint8s (mxUint8 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
586 { DO_MUTABLE_METHOD (int, set_uint8s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
587 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
588 int set_uint16s (mxUint16 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
589 { DO_MUTABLE_METHOD (int, set_uint16s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
590 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
591 int set_uint32s (mxUint32 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
592 { DO_MUTABLE_METHOD (int, set_uint32s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
593 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
594 int set_uint64s (mxUint64 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
595 { DO_MUTABLE_METHOD (int, set_uint64s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
596 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
597 int set_complex_doubles (mxComplexDouble *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
598 { DO_MUTABLE_METHOD (int, set_complex_doubles (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
599 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
600 int set_complex_singles (mxComplexSingle *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
601 { DO_MUTABLE_METHOD (int, set_complex_singles (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
602 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
603 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
604 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
605 int set_complex_int8s (mxComplexInt8 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
606 { DO_MUTABLE_METHOD (int, set_complex_int8s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
607 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
608 int set_complex_int16s (mxComplexInt16 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
609 { DO_MUTABLE_METHOD (int, set_complex_int16s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
610 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
611 int set_complex_int32s (mxComplexInt32 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
612 { DO_MUTABLE_METHOD (int, set_complex_int32s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
613 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
614 int set_complex_int64s (mxComplexInt64 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
615 { DO_MUTABLE_METHOD (int, set_complex_int64s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
616 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
617 int set_complex_uint8s (mxComplexUint8 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
618 { DO_MUTABLE_METHOD (int, set_complex_uint8s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
619 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
620 int set_complex_uint16s (mxComplexUint16 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
621 { DO_MUTABLE_METHOD (int, set_complex_uint16s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
622 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
623 int set_complex_uint32s (mxComplexUint32 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
624 { DO_MUTABLE_METHOD (int, set_complex_uint32s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
625 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
626 int set_complex_uint64s (mxComplexUint64 *data) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
627 { DO_MUTABLE_METHOD (int, set_complex_uint64s (data)); } |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
628 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
629 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
630 void set_imag_data (void *pi) { DO_VOID_MUTABLE_METHOD (set_imag_data (pi)); } |
6686 | 631 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
632 mwIndex * get_ir (void) const { DO_MUTABLE_METHOD (mwIndex *, get_ir ()); } |
6686 | 633 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
634 mwIndex * get_jc (void) const { DO_MUTABLE_METHOD (mwIndex *, get_jc ()); } |
6686 | 635 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
636 mwSize get_nzmax (void) const { return m_rep->get_nzmax (); } |
6686 | 637 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
638 void set_ir (mwIndex *ir) { DO_VOID_MUTABLE_METHOD (set_ir (ir)); } |
6686 | 639 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
640 void set_jc (mwIndex *jc) { DO_VOID_MUTABLE_METHOD (set_jc (jc)); } |
6686 | 641 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
642 void set_nzmax (mwSize nzmax) { DO_VOID_MUTABLE_METHOD (set_nzmax (nzmax)); } |
6686 | 643 |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
644 int add_field (const char *key) { DO_MUTABLE_METHOD (int, add_field (key)); } |
6686 | 645 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
646 void remove_field (int key_num) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
647 { DO_VOID_MUTABLE_METHOD (remove_field (key_num)); } |
6686 | 648 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
649 mxArray * get_field_by_number (mwIndex index, int key_num) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
650 { DO_MUTABLE_METHOD (mxArray *, get_field_by_number (index, key_num)); } |
6686 | 651 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
652 void set_field_by_number (mwIndex index, int key_num, mxArray *val) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
653 { DO_VOID_MUTABLE_METHOD (set_field_by_number (index, key_num, val)); } |
6686 | 654 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
655 int get_number_of_fields (void) const { return m_rep->get_number_of_fields (); } |
6686 | 656 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
657 const char * get_field_name_by_number (int key_num) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
658 { DO_MUTABLE_METHOD (const char*, get_field_name_by_number (key_num)); } |
6686 | 659 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
660 int get_field_number (const char *key) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
661 { DO_MUTABLE_METHOD (int, get_field_number (key)); } |
6686 | 662 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
663 int get_string (char *buf, mwSize buflen) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
664 { return m_rep->get_string (buf, buflen); } |
6686 | 665 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
666 char * array_to_string (void) const { return m_rep->array_to_string (); } |
6686 | 667 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
668 mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
669 { return m_rep->calc_single_subscript (nsubs, subs); } |
6686 | 670 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
671 std::size_t get_element_size (void) const { return m_rep->get_element_size (); } |
6686 | 672 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
673 bool mutation_needed (void) const { return m_rep->mutation_needed (); } |
6686 | 674 |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
675 mxArray * mutate (void) const { return m_rep->mutate (); } |
6686 | 676 |
29572
aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
677 static OCTINTERP_API void * malloc (std::size_t n); |
6686 | 678 |
29572
aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
679 static OCTINTERP_API void * calloc (std::size_t n, std::size_t t); |
6686 | 680 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
681 static char * strsave (const char *str) |
6686 | 682 { |
23457
21baad6b35c4
maint: Use C++11 nullptr rather than 0 or NULL when possible.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
683 char *retval = nullptr; |
6686 | 684 |
685 if (str) | |
686 { | |
21568
3d60ed163b70
maint: Eliminate bad spacing around '='.
Rik <rik@octave.org>
parents:
21244
diff
changeset
|
687 mwSize sz = sizeof (mxChar) * (strlen (str) + 1); |
26405
b352120504bc
ensure valid pointer is passed to strcpy (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26401
diff
changeset
|
688 |
10317
42d098307c30
untabify additional source files
John W. Eaton <jwe@octave.org>
parents:
9906
diff
changeset
|
689 retval = static_cast<char *> (mxArray::malloc (sz)); |
26405
b352120504bc
ensure valid pointer is passed to strcpy (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26401
diff
changeset
|
690 |
b352120504bc
ensure valid pointer is passed to strcpy (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26401
diff
changeset
|
691 if (retval) |
b352120504bc
ensure valid pointer is passed to strcpy (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26401
diff
changeset
|
692 strcpy (retval, str); |
6686 | 693 } |
694 | |
695 return retval; | |
696 } | |
697 | |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
698 static OCTINTERP_API octave_value |
25451
f84755f24ccd
allow NULL mxArray* to be returned as undefined from fcn calls (bug #54096)
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
699 as_octave_value (const mxArray *ptr, bool null_is_empty = true); |
6686 | 700 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
701 OCTINTERP_API octave_value as_octave_value (void) const; |
6686 | 702 |
703 private: | |
704 | |
15351
a291f850743c
modernize mxArray class hierarchy
John W. Eaton <jwe@octave.org>
parents:
15240
diff
changeset
|
705 mxArray (mxArray_base *r, const char *n) |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
706 : m_rep (r), m_name (mxArray::strsave (n)) { } |
6686 | 707 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
708 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
709 create_rep (bool interleaved, const octave_value& ov); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
710 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
711 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
712 create_rep (bool interleaved, mxClassID id, mwSize ndims, |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
713 const mwSize *dims, mxComplexity flag, bool init); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
714 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
715 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
716 create_rep (bool interleaved, mxClassID id, const dim_vector& dv, |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
717 mxComplexity flag); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
718 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
719 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
720 create_rep (bool interleaved, mxClassID id, mwSize m, mwSize n, |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
721 mxComplexity flag, bool init); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
722 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
723 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
724 create_rep (bool interleaved, mxClassID id, double val); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
725 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
726 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
727 create_rep (bool interleaved, mxClassID id, mxLogical val); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
728 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
729 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
730 create_rep (bool interleaved, const char *str); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
731 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
732 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
733 create_rep (bool interleaved, mwSize m, const char **str); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
734 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
735 static OCTINTERP_API mxArray_base * |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
736 create_rep (bool interleaved, mxClassID id, mwSize m, mwSize n, |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
737 mwSize nzmax, mxComplexity flag); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
738 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
739 OCTINTERP_API void maybe_mutate (void) const; |
30122
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
740 |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
741 //-------- |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
742 |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
743 mutable mxArray_base *m_rep; |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
744 |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
745 char *m_name; |
8418f99cfcd0
maint: use "m_" prefix for member variables in class mxArray_base.
Rik <rik@octave.org>
parents:
29655
diff
changeset
|
746 |
6686 | 747 }; |
748 | |
749 #undef DO_MUTABLE_METHOD | |
750 #undef DO_VOID_MUTABLE_METHOD | |
751 | |
752 #endif | |
753 #endif |