annotate src/ov-base.h @ 9685:e793865ede63

implement builtin_type
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 02 Oct 2009 08:27:44 +0200
parents e08d72bb988e
children 34d6f005db4b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
1 /*
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8916
diff changeset
4 2006, 2007, 2008, 2009 John W. Eaton
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
5
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
7
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6974
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6974
diff changeset
11 option) any later version.
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
12
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
16 for more details.
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
17
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6974
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6974
diff changeset
20 <http://www.gnu.org/licenses/>.
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
21
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
22 */
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
23
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_base_value_h)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
25 #define octave_base_value_h 1
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
26
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
27 #include <cstdlib>
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
28
8950
d865363208d6 include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
29 #include <iosfwd>
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
30 #include <list>
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
31 #include <string>
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
32
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
33 #include "Range.h"
5828
22e23bee74c8 [project @ 2006-05-23 06:05:14 by jwe]
jwe
parents: 5785
diff changeset
34 #include "data-conv.h"
5900
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
35 #include "mxarray.h"
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
36 #include "mx-base.h"
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
37 #include "str-vec.h"
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
38
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
39 #include "error.h"
8676
22462fd58e66 require HDF5 v1.6 API
John W. Eaton <jwe@octave.org>
parents: 8658
diff changeset
40 #include "oct-hdf5.h"
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
41
3351
8623649c967c [project @ 1999-11-15 16:17:01 by jwe]
jwe
parents: 3340
diff changeset
42 class Cell;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
43 class Octave_map;
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
44 class octave_value;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
45 class octave_value_list;
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
46 class octave_stream;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
47 class octave_function;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
48 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
49 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
50 class octave_user_code;
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
51 class octave_fcn_handle;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
52 class octave_fcn_inline;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
53 class octave_value_list;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
54 class octave_lvalue;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
55
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
56 class tree_walker;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
57
9685
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
58 enum builtin_type_t
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
59 {
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
60 btyp_double,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
61 btyp_float,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
62 btyp_complex,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
63 btyp_float_complex,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
64 btyp_int8,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
65 btyp_int16,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
66 btyp_int32,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
67 btyp_int64,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
68 btyp_uint8,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
69 btyp_uint16,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
70 btyp_uint32,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
71 btyp_uint64,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
72 btyp_char,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
73 btyp_bool,
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
74 btyp_unknown
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
75 };
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
76
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
77 template <class T>
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
78 struct class_to_btyp
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
79 {
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
80 static const builtin_type_t btyp = btyp_unknown;
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
81 };
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
82
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
83 #define DEF_CLASS_TO_BTYP(CLASS,BTYP) \
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
84 template <> \
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
85 struct class_to_btyp<CLASS> \
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
86 { static const builtin_type_t btyp = BTYP; }
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
87
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
88 DEF_CLASS_TO_BTYP (double, btyp_double);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
89 DEF_CLASS_TO_BTYP (float, btyp_float);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
90 DEF_CLASS_TO_BTYP (Complex, btyp_complex);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
91 DEF_CLASS_TO_BTYP (FloatComplex, btyp_float_complex);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
92 DEF_CLASS_TO_BTYP (octave_int8, btyp_int8);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
93 DEF_CLASS_TO_BTYP (octave_int16, btyp_int16);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
94 DEF_CLASS_TO_BTYP (octave_int32, btyp_int32);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
95 DEF_CLASS_TO_BTYP (octave_int64, btyp_int64);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
96 DEF_CLASS_TO_BTYP (octave_uint8, btyp_uint8);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
97 DEF_CLASS_TO_BTYP (octave_uint16, btyp_uint16);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
98 DEF_CLASS_TO_BTYP (octave_uint32, btyp_uint32);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
99 DEF_CLASS_TO_BTYP (octave_uint64, btyp_uint64);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
100 DEF_CLASS_TO_BTYP (bool, btyp_bool);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
101 DEF_CLASS_TO_BTYP (char, btyp_char);
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
102
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
103 // 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
104 // 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
105
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
106 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \
7066
7773c0fdefa6 [project @ 2007-10-25 06:06:41 by jwe]
jwe
parents: 7056
diff changeset
107 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
108
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
109 #define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
110 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual)
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
111
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
112 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL) \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
113 public: \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
114 VIRTUAL int type_id (void) const { return t_id; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
115 VIRTUAL std::string type_name (void) const { return t_name; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
116 VIRTUAL std::string class_name (void) const { return c_name; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
117 static int static_type_id (void) { return t_id; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
118 static std::string static_type_name (void) { return t_name; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
119 static std::string static_class_name (void) { return c_name; } \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
120 static void register_type (void); \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
121 \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
122 private: \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
123 static int t_id; \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
124 static const std::string t_name; \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
125 static const std::string c_name;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
126
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
127
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
128 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
129 int t::t_id (-1); \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
130 const std::string t::t_name (n); \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
131 const std::string t::c_name (c); \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
132 void t::register_type (void) \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
133 { \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
134 t_id = octave_value_typeinfo::register_type (t::t_name, \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
135 t::c_name, \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
136 octave_value (new t ())); \
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
137 }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
138
2477
3d905d3820a4 [project @ 1996-11-07 16:46:11 by jwe]
jwe
parents: 2466
diff changeset
139 // 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
140 // 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
141 // octave_value).
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
142
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
143 class
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5958
diff changeset
144 OCTINTERP_API
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
145 octave_base_value
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
146 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
147 public:
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
148
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
149 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
150
8345
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
151 // type conversion, including result type information
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
152 class type_conv_info
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
153 {
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
154 public:
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
155 type_conv_info (type_conv_fcn f = 0, int t = -1) : _fcn (f), _type_id (t) { }
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
156
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
157 operator type_conv_fcn (void) const { return _fcn; }
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
158
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
159 octave_base_value * operator () (const octave_base_value &v) const
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
160 { return (*_fcn) (v); }
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
161
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
162 int type_id (void) const { return _type_id; }
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
163
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
164 private:
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
165 type_conv_fcn _fcn;
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
166 int _type_id;
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
167 };
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
168
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
169 friend class octave_value;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
170
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
171 octave_base_value (void) : count (1) { }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
172
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
173 octave_base_value (const octave_base_value&) : count (1) { }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
174
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
175 virtual ~octave_base_value (void) { }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
176
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
177 // Unconditional clone. Always clones.
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
178 virtual octave_base_value *
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
179 clone (void) const { return new octave_base_value (*this); }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
180
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
181 // Empty clone.
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
182 virtual octave_base_value *
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
183 empty_clone (void) const { return new octave_base_value (); }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
184
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
185 // Unique clone. Usually clones, but may be overriden to fake the
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
186 // cloning when sharing copies is to be controlled from within an
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
187 // instance (see octave_class).
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
188 virtual octave_base_value *
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
189 unique_clone (void) { return clone (); }
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
190
8345
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
191 virtual type_conv_info
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
192 numeric_conversion_function (void) const
8345
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
193 { return type_conv_info (); }
2410
367485171742 [project @ 1996-10-15 16:50:27 by jwe]
jwe
parents: 2376
diff changeset
194
8345
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
195 virtual type_conv_info
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
196 numeric_demotion_function (void) const
8345
c777f3ce02d8 smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
197 { return type_conv_info (); }
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
198
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
199 virtual octave_value squeeze (void) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
200
8458
d254a21e0120 reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8437
diff changeset
201 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
202
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
203 virtual octave_base_value *try_narrowing_conversion (void) { return 0; }
4532
01ee68d18069 [project @ 2003-10-10 00:49:54 by jwe]
jwe
parents: 4513
diff changeset
204
8523
ad3afaaa19c1 implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 8458
diff changeset
205 virtual void maybe_economize (void) { }
ad3afaaa19c1 implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 8458
diff changeset
206
9329
67fc970dad7d improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents: 9182
diff changeset
207 virtual Matrix size (void);
67fc970dad7d improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents: 9182
diff changeset
208
67fc970dad7d improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents: 9182
diff changeset
209 virtual octave_idx_type numel (const octave_value_list&);
67fc970dad7d improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents: 9182
diff changeset
210
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
211 virtual octave_value
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
212 subsref (const std::string& type,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
213 const std::list<octave_value_list>& idx);
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3544
diff changeset
214
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
215 virtual octave_value_list
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
216 subsref (const std::string& type,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
217 const std::list<octave_value_list>& idx,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
218 int nargout);
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3544
diff changeset
219
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
220 virtual octave_value
8551
906f976d35a8 further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents: 8523
diff changeset
221 subsref (const std::string& type,
906f976d35a8 further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents: 8523
diff changeset
222 const std::list<octave_value_list>& idx,
906f976d35a8 further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents: 8523
diff changeset
223 bool auto_add);
906f976d35a8 further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents: 8523
diff changeset
224
906f976d35a8 further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents: 8523
diff changeset
225 virtual octave_value
5885
bd3041e30d97 [project @ 2006-07-14 20:29:35 by jwe]
jwe
parents: 5881
diff changeset
226 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
227
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
228 virtual octave_value_list
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3539
diff changeset
229 do_multi_index_op (int nargout, const octave_value_list& idx);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
230
9147
5579998f8acf Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents: 9010
diff changeset
231 virtual void assign (const std::string&, const octave_value&) { }
5579998f8acf Update to OOP facilities.
rtshort@bristlecone.phaselocked.com
parents: 9010
diff changeset
232
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
233 virtual octave_value
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
234 subsasgn (const std::string& type,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
235 const std::list<octave_value_list>& idx,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
236 const octave_value& rhs);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
237
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
238 virtual idx_vector index_vector (void) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
239
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
240 virtual dim_vector dims (void) const { return dim_vector (-1, -1); }
4559
802818bfac91 [project @ 2003-10-28 19:13:43 by jwe]
jwe
parents: 4554
diff changeset
241
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
242 octave_idx_type rows (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
243 {
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
244 dim_vector dv = dims ();
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents: 5105
diff changeset
245
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
246 return (dv.length () > 0) ? dv(0) : -1;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
247 }
4791
62f2fb593455 [project @ 2004-02-20 18:02:59 by jwe]
jwe
parents: 4741
diff changeset
248
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
249 octave_idx_type columns (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
250 {
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
251 dim_vector dv = dims ();
5602
dfa2da0563e5 [project @ 2006-01-31 03:43:40 by jwe]
jwe
parents: 5353
diff changeset
252
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
253 return (dv.length () > 1) ? dv(1) : -1;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
254 }
5604
2857357f9d3c [project @ 2006-01-31 18:22:59 by jwe]
jwe
parents: 5602
diff changeset
255
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
256 virtual int ndims (void) const;
4567
fc30061d01da [project @ 2003-10-29 20:11:15 by jwe]
jwe
parents: 4563
diff changeset
257
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
258 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
259
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
260 virtual octave_idx_type capacity (void) const { return numel (); }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
261
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
262 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
263
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
264 virtual octave_idx_type nnz (void) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
265
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
266 virtual octave_idx_type nzmax (void) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
267
5900
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
268 virtual octave_idx_type nfields (void) const;
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
269
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
270 virtual octave_value reshape (const dim_vector&) const;
3351
8623649c967c [project @ 1999-11-15 16:17:01 by jwe]
jwe
parents: 3340
diff changeset
271
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
272 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
273
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
274 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
275
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5781
diff changeset
276 virtual MatrixType matrix_type (void) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5781
diff changeset
277
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5781
diff changeset
278 virtual MatrixType matrix_type (const MatrixType& typ) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5781
diff changeset
279
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
280 virtual bool is_defined (void) const { return false; }
4505
e944fbe3fff2 [project @ 2003-09-09 19:14:06 by jwe]
jwe
parents: 4457
diff changeset
281
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
282 bool is_empty (void) const { return numel () == 0; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
283
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
284 virtual bool is_cell (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
285
6116
b64fb24bf4a0 [project @ 2006-10-27 18:04:49 by jwe]
jwe
parents: 6109
diff changeset
286 virtual bool is_cellstr (void) const { return false; }
b64fb24bf4a0 [project @ 2006-10-27 18:04:49 by jwe]
jwe
parents: 6109
diff changeset
287
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
288 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
289
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
290 virtual bool is_real_matrix (void) const { return false; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
291
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
292 virtual bool is_real_nd_array (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
293
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
294 virtual bool is_complex_scalar (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
295
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
296 virtual bool is_complex_matrix (void) const { return false; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
297
5881
70b3f8f1a793 [project @ 2006-07-08 03:54:17 by jwe]
jwe
parents: 5864
diff changeset
298 virtual bool is_bool_scalar (void) const { return false; }
70b3f8f1a793 [project @ 2006-07-08 03:54:17 by jwe]
jwe
parents: 5864
diff changeset
299
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
300 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
301
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
302 virtual bool is_char_matrix (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
303
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 8345
diff changeset
304 virtual bool is_diag_matrix (void) const { return false; }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 8345
diff changeset
305
8371
c3f7e2549abb make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8366
diff changeset
306 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
307
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
308 virtual bool is_string (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
309
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
310 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
311
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
312 virtual bool is_range (void) const { return false; }
3977
95663a3a2682 [project @ 2002-07-05 17:43:37 by jwe]
jwe
parents: 3933
diff changeset
313
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
314 virtual bool is_map (void) const { return false; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
315
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
316 virtual bool is_object (void) const { return false; }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
317
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
318 virtual bool is_cs_list (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
319
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
320 virtual bool is_list (void) const { return false; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
321
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
322 virtual bool is_magic_colon (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
323
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
324 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
325
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
326 virtual octave_value all (int = 0) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
327
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
328 virtual octave_value any (int = 0) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
329
9685
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
330 virtual builtin_type_t builtin_type (void) const { return btyp_unknown; }
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 9521
diff changeset
331
5895
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
332 virtual bool is_double_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
333
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
334 virtual bool is_single_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
335
7576
7ebdc99a0bab new isfloat function
John W. Eaton <jwe@octave.org>
parents: 7528
diff changeset
336 virtual bool is_float_type (void) const { return false; }
7ebdc99a0bab new isfloat function
John W. Eaton <jwe@octave.org>
parents: 7528
diff changeset
337
5895
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
338 virtual bool is_int8_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
339
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
340 virtual bool is_int16_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
341
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
342 virtual bool is_int32_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
343
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
344 virtual bool is_int64_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
345
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
346 virtual bool is_uint8_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
347
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
348 virtual bool is_uint16_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
349
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
350 virtual bool is_uint32_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
351
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
352 virtual bool is_uint64_type (void) const { return false; }
b9c45e0cf685 [project @ 2006-07-19 01:57:44 by jwe]
jwe
parents: 5885
diff changeset
353
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
354 virtual bool is_bool_type (void) const { return false; }
3209
fbb332b96e4f [project @ 1998-11-03 20:48:54 by jwe]
jwe
parents: 3203
diff changeset
355
6223
a6cc01dd09f9 [project @ 2007-01-03 20:59:28 by jwe]
jwe
parents: 6116
diff changeset
356 virtual bool is_integer_type (void) const { return false; }
a6cc01dd09f9 [project @ 2007-01-03 20:59:28 by jwe]
jwe
parents: 6116
diff changeset
357
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
358 virtual bool is_real_type (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
359
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
360 virtual bool is_complex_type (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
361
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
362 // 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
363
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
364 virtual bool is_scalar_type (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
365
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
366 virtual bool is_matrix_type (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
367
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
368 virtual bool is_numeric_type (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
369
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
370 virtual bool is_sparse_type (void) const { return false; }
5631
7171d19706df [project @ 2006-02-22 20:15:06 by dbateman]
dbateman
parents: 5604
diff changeset
371
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
372 virtual bool is_true (void) const { return false; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
373
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 7885
diff changeset
374 virtual bool is_null_value (void) const { return false; }
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 7885
diff changeset
375
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
376 virtual bool is_constant (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
377
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
378 virtual bool is_function_handle (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
379
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
380 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
381
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
382 virtual bool is_function (void) const { return false; }
4954
ed0f3cb6d3d4 [project @ 2004-09-01 21:24:53 by jwe]
jwe
parents: 4944
diff changeset
383
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
384 virtual bool is_user_script (void) const { return false; }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
385
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
386 virtual bool is_user_function (void) const { return false; }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7193
diff changeset
387
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
388 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
389
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
390 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
391
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
392 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
393
5864
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5828
diff changeset
394 virtual bool is_mex_function (void) const { return false; }
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5828
diff changeset
395
7876
8447a5024650 clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
396 virtual void erase_subfunctions (void) { }
8447a5024650 clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
397
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
398 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
399
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
400 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
401
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
402 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
403
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
404 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
405
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
406 virtual int nint_value (bool = false) const;
3202
44d82b369c78 [project @ 1998-10-29 20:27:57 by jwe]
jwe
parents: 3195
diff changeset
407
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
408 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
409
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
410 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
411
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
412 virtual double double_value (bool = false) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
413
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
414 virtual float float_value (bool = false) const;
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
415
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
416 virtual double scalar_value (bool frc_str_conv = false) const
3145
0d640dc625c7 [project @ 1998-02-05 08:44:59 by jwe]
jwe
parents: 2979
diff changeset
417 { return double_value (frc_str_conv); }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
418
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
419 virtual float float_scalar_value (bool frc_str_conv = false) const
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
420 { return float_value (frc_str_conv); }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
421
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
422 virtual Cell cell_value (void) const;
3351
8623649c967c [project @ 1999-11-15 16:17:01 by jwe]
jwe
parents: 3340
diff changeset
423
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
424 virtual Matrix matrix_value (bool = false) const;
3145
0d640dc625c7 [project @ 1998-02-05 08:44:59 by jwe]
jwe
parents: 2979
diff changeset
425
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
426 virtual FloatMatrix float_matrix_value (bool = false) const;
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
427
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
428 virtual NDArray array_value (bool = false) const;
4505
e944fbe3fff2 [project @ 2003-09-09 19:14:06 by jwe]
jwe
parents: 4457
diff changeset
429
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
430 virtual FloatNDArray float_array_value (bool = false) const;
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
431
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
432 virtual Complex complex_value (bool = false) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
433
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
434 virtual FloatComplex float_complex_value (bool = false) const;
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
435
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
436 virtual ComplexMatrix complex_matrix_value (bool = false) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
437
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
438 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
439
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
440 virtual ComplexNDArray complex_array_value (bool = false) const;
4550
69a9b22a72a2 [project @ 2003-10-27 15:41:55 by jwe]
jwe
parents: 4532
diff changeset
441
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7761
diff changeset
442 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
443
5943
c038c2947ee1 [project @ 2006-08-18 21:27:03 by jwe]
jwe
parents: 5900
diff changeset
444 virtual bool bool_value (bool = false) const;
4550
69a9b22a72a2 [project @ 2003-10-27 15:41:55 by jwe]
jwe
parents: 4532
diff changeset
445
5943
c038c2947ee1 [project @ 2006-08-18 21:27:03 by jwe]
jwe
parents: 5900
diff changeset
446 virtual boolMatrix bool_matrix_value (bool = false) const;
4550
69a9b22a72a2 [project @ 2003-10-27 15:41:55 by jwe]
jwe
parents: 4532
diff changeset
447
5943
c038c2947ee1 [project @ 2006-08-18 21:27:03 by jwe]
jwe
parents: 5900
diff changeset
448 virtual boolNDArray bool_array_value (bool = false) const;
4550
69a9b22a72a2 [project @ 2003-10-27 15:41:55 by jwe]
jwe
parents: 4532
diff changeset
449
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
450 virtual charMatrix char_matrix_value (bool force = false) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
451
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
452 virtual charNDArray char_array_value (bool = false) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
453
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
454 virtual SparseMatrix sparse_matrix_value (bool = false) const;
4550
69a9b22a72a2 [project @ 2003-10-27 15:41:55 by jwe]
jwe
parents: 4532
diff changeset
455
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
456 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
457
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
458 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
459
8916
a2878ba31a9e add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8734
diff changeset
460 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
461
a2878ba31a9e add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8734
diff changeset
462 virtual FloatDiagMatrix float_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
463
a2878ba31a9e add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8734
diff changeset
464 virtual ComplexDiagMatrix complex_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
465
a2878ba31a9e add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8734
diff changeset
466 virtual FloatComplexDiagMatrix float_complex_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
467
a2878ba31a9e add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents: 8734
diff changeset
468 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
469
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
470 virtual octave_int8 int8_scalar_value (void) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents: 5105
diff changeset
471
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
472 virtual octave_int16 int16_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
473
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
474 virtual octave_int32 int32_scalar_value (void) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
475
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
476 virtual octave_int64 int64_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
477
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
478 virtual octave_uint8 uint8_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
479
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
480 virtual octave_uint16 uint16_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
481
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
482 virtual octave_uint32 uint32_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
483
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
484 virtual octave_uint64 uint64_scalar_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
485
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
486 virtual int8NDArray int8_array_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
487
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
488 virtual int16NDArray int16_array_value (void) const;
4910
1242acab4246 [project @ 2004-07-12 17:14:13 by jwe]
jwe
parents: 4906
diff changeset
489
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
490 virtual int32NDArray int32_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
491
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
492 virtual int64NDArray int64_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
493
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
494 virtual uint8NDArray uint8_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
495
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
496 virtual uint16NDArray uint16_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
497
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
498 virtual uint32NDArray uint32_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
499
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
500 virtual uint64NDArray uint64_array_value (void) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
501
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
502 virtual string_vector all_strings (bool pad = false) const;
4906
6754342ef7ad [project @ 2004-06-23 11:11:50 by jwe]
jwe
parents: 4791
diff changeset
503
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
504 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
505
8732
a669df7beb73 [mq]: x
John W. Eaton <jwe@octave.org>
parents: 8721
diff changeset
506 virtual Array<std::string> cellstr_value (void) const;
a669df7beb73 [mq]: x
John W. Eaton <jwe@octave.org>
parents: 8721
diff changeset
507
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
508 virtual Range range_value (void) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
509
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
510 virtual Octave_map map_value (void) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
511
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
512 virtual string_vector map_keys (void) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
513
9151
d8f9588c6ba1 object exemplars
John W. Eaton <jwe@octave.org>
parents: 9147
diff changeset
514 virtual size_t nparents (void) const;
d8f9588c6ba1 object exemplars
John W. Eaton <jwe@octave.org>
parents: 9147
diff changeset
515
d8f9588c6ba1 object exemplars
John W. Eaton <jwe@octave.org>
parents: 9147
diff changeset
516 virtual std::list<std::string> parent_class_name_list (void) const;
d8f9588c6ba1 object exemplars
John W. Eaton <jwe@octave.org>
parents: 9147
diff changeset
517
d8f9588c6ba1 object exemplars
John W. Eaton <jwe@octave.org>
parents: 9147
diff changeset
518 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
519
f914834836e7 Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents: 8950
diff changeset
520 virtual octave_base_value *find_parent_class (const std::string&)
f914834836e7 Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents: 8950
diff changeset
521 { return 0; }
f914834836e7 Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents: 8950
diff changeset
522
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
523 virtual octave_function *function_value (bool silent = false);
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3544
diff changeset
524
7761
5adeea5de26c symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents: 7740
diff changeset
525 virtual const octave_function *function_value (bool silent = false) const;
5adeea5de26c symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents: 7740
diff changeset
526
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
527 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
528
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
529 virtual octave_user_script *user_script_value (bool silent = 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
530
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
531 virtual octave_user_code *user_code_value (bool silent = 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
532
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
533 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
534
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
535 virtual octave_fcn_inline *fcn_inline_value (bool silent = false);
2974
ebbc34ff7f66 [project @ 1997-05-15 19:36:16 by jwe]
jwe
parents: 2962
diff changeset
536
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
537 virtual octave_value_list list_value (void) const;
4343
db5e0814277a [project @ 2003-02-20 16:44:16 by jwe]
jwe
parents: 4254
diff changeset
538
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
539 virtual octave_value convert_to_str (bool pad = false, bool force = false,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
540 char type = '"') const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
541 virtual octave_value
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
542 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
543
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
544 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
545
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
546 virtual bool print_as_scalar (void) const { return false; }
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
547
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
548 virtual void print (std::ostream& os, bool pr_as_read_syntax = false) const;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
549
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
550 virtual void
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
551 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
552
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
553 virtual bool
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
554 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
555
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
556 virtual void
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
557 print_with_name (std::ostream& output_buf, const std::string& name,
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
558 bool print_padding = true);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
559
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
560 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
561
6974
9e32bb109980 [project @ 2007-10-08 11:06:47 by jwe]
jwe
parents: 6223
diff changeset
562 virtual bool save_ascii (std::ostream& os);
4687
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
563
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
564 virtual bool load_ascii (std::istream& is);
4687
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
565
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
566 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
567
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
568 virtual bool load_binary (std::istream& is, bool swap,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
569 oct_mach_info::float_format fmt);
4687
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
570
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
571 #if defined (HAVE_HDF5)
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
572 virtual bool
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
573 save_hdf5 (hid_t 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
574
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
575 virtual bool
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
576 load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug);
4687
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
577 #endif
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4667
diff changeset
578
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
579 virtual int
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
580 write (octave_stream& os, int block_size,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
581 oct_data_conv::data_type output_type, int skip,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
582 oct_mach_info::float_format flt_fmt) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
583
5900
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
584 virtual void *mex_get_data (void) const { return 0; }
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
585
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
586 virtual octave_idx_type *mex_get_ir (void) const { return 0; }
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
587
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
588 virtual octave_idx_type *mex_get_jc (void) const { return 0; }
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
589
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
590 virtual mxArray *as_mxArray (void) const;
c20eb7330d13 [project @ 2006-07-22 08:31:16 by jwe]
jwe
parents: 5895
diff changeset
591
7620
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7576
diff changeset
592 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
593
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7336
diff changeset
594 virtual octave_value sort (octave_idx_type dim = 0,
7463
2467639bd8c0 eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents: 7433
diff changeset
595 sortmode mode = ASCENDING) const;
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7336
diff changeset
596 virtual octave_value sort (Array<octave_idx_type> &sidx,
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7336
diff changeset
597 octave_idx_type dim = 0,
7463
2467639bd8c0 eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents: 7433
diff changeset
598 sortmode mode = ASCENDING) const;
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7336
diff changeset
599
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
600 virtual sortmode is_sorted (sortmode mode = UNSORTED) const;
8721
e9cb742df9eb imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents: 8676
diff changeset
601
8733
3ef774603887 rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents: 8732
diff changeset
602 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
603 sort_rows_idx (sortmode mode = ASCENDING) const;
8721
e9cb742df9eb imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents: 8676
diff changeset
604
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
605 virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const;
8721
e9cb742df9eb imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents: 8676
diff changeset
606
7489
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
607 virtual void lock (void);
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
608
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
609 virtual void unlock (void);
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
610
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
611 virtual bool islocked (void) const { return false; }
8e4592e49fa7 don't clear locked functions
John W. Eaton <jwe@octave.org>
parents: 7463
diff changeset
612
7761
5adeea5de26c symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents: 7740
diff changeset
613 virtual void dump (std::ostream& os) const;
5adeea5de26c symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents: 7740
diff changeset
614
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
615 virtual octave_value abs (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
616 virtual octave_value acos (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
617 virtual octave_value acosh (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
618 virtual octave_value angle (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
619 virtual octave_value arg (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
620 virtual octave_value asin (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
621 virtual octave_value asinh (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
622 virtual octave_value atan (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
623 virtual octave_value atanh (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
624 virtual octave_value ceil (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
625 virtual octave_value conj (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
626 virtual octave_value cos (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
627 virtual octave_value cosh (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
628 virtual octave_value erf (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
629 virtual octave_value erfc (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
630 virtual octave_value exp (void) const;
7638
2df457529cfa implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents: 7636
diff changeset
631 virtual octave_value expm1 (void) const;
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
632 virtual octave_value finite (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
633 virtual octave_value fix (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
634 virtual octave_value floor (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
635 virtual octave_value gamma (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
636 virtual octave_value imag (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
637 virtual octave_value isinf (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
638 virtual octave_value isna (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
639 virtual octave_value isnan (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
640 virtual octave_value lgamma (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
641 virtual octave_value log (void) const;
7740
39930366b709 implement builtin log2
Jaroslav Hajek <highegg@gmail.com>
parents: 7719
diff changeset
642 virtual octave_value log2 (void) const;
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
643 virtual octave_value log10 (void) const;
7638
2df457529cfa implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents: 7636
diff changeset
644 virtual octave_value log1p (void) const;
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
645 virtual octave_value real (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
646 virtual octave_value round (void) const;
7636
99c410f7f0b0 implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents: 7620
diff changeset
647 virtual octave_value roundb (void) const;
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
648 virtual octave_value signum (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
649 virtual octave_value sin (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
650 virtual octave_value sinh (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
651 virtual octave_value sqrt (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
652 virtual octave_value tan (void) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
653 virtual octave_value tanh (void) const;
7528
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
654
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
655 // These functions are prefixed with X to avoid potential macro
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
656 // conflicts.
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
657
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
658 virtual octave_value xisalnum (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
659 virtual octave_value xisalpha (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
660 virtual octave_value xisascii (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
661 virtual octave_value xiscntrl (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
662 virtual octave_value xisdigit (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
663 virtual octave_value xisgraph (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
664 virtual octave_value xislower (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
665 virtual octave_value xisprint (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
666 virtual octave_value xispunct (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
667 virtual octave_value xisspace (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
668 virtual octave_value xisupper (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
669 virtual octave_value xisxdigit (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
670 virtual octave_value xtoascii (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
671 virtual octave_value xtolower (void) const;
26d8a92644de try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
672 virtual octave_value xtoupper (void) const;
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7489
diff changeset
673
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
674 protected:
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
675
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
676 // This should only be called for derived types.
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
677
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
678 octave_value numeric_assign (const std::string& type,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
679 const std::list<octave_value_list>& idx,
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
680 const octave_value& rhs);
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
681
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
682 void reset_indent_level (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
683 { curr_print_indent_level = 0; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
684
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
685 void increment_indent_level (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
686 { curr_print_indent_level += 2; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
687
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
688 void decrement_indent_level (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
689 { curr_print_indent_level -= 2; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
690
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
691 int current_print_indent_level (void) const
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
692 { return curr_print_indent_level; }
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
693
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
694 void indent (std::ostream& os) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
695
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
696 void newline (std::ostream& os) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
697
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
698 void reset (void) const;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
699
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
700 // A reference count.
9521
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
701 // NOTE: the declaration is octave_idx_type because with 64-bit indexing,
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
702 // 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
703 // (think of an empty cell array with >2G elements).
e08d72bb988e simplify cloning
Jaroslav Hajek <highegg@gmail.com>
parents: 9329
diff changeset
704 octave_idx_type count;
4944
44046bbaa52c [project @ 2004-08-31 05:30:46 by jwe]
jwe
parents: 4933
diff changeset
705
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
706 private:
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
707
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
708 static int curr_print_indent_level;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
709 static bool beginning_of_line;
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
710
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5731
diff changeset
711 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
712 };
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
713
7193
cbdee3da62bd [project @ 2007-11-26 22:20:25 by dbateman]
dbateman
parents: 7067
diff changeset
714 // 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
715 // is memory to be saved
cbdee3da62bd [project @ 2007-11-26 22:20:25 by dbateman]
dbateman
parents: 7067
diff changeset
716 extern bool Vsparse_auto_mutate;
cbdee3da62bd [project @ 2007-11-26 22:20:25 by dbateman]
dbateman
parents: 7067
diff changeset
717
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
718 #endif
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
719
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
720 /*
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
721 ;;; Local Variables: ***
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
722 ;;; mode: C++ ***
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
723 ;;; End: ***
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
724 */