annotate libinterp/octave-value/ov-base.h @ 29476:c74ff452e2bb stable

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