annotate src/ov-typeinfo.cc @ 10352:a3635bc1ea19

remove Array2
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 23 Feb 2010 16:12:27 +0100
parents 12884915a8e4
children 9e8497537319
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, 2000, 2002, 2003, 2004, 2005, 2006,
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8677
diff changeset
4 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: 6708
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: 6708
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: 6708
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: 6708
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 #ifdef HAVE_CONFIG_H
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
25 #include <config.h>
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
26 #endif
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
27
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
28 #include "ov-typeinfo.h"
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
29
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
30 #include "defun.h"
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
31 #include "error.h"
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
32
2479
26e9ee533d87 [project @ 1996-11-07 17:46:14 by jwe]
jwe
parents: 2457
diff changeset
33 const int
26e9ee533d87 [project @ 1996-11-07 17:46:14 by jwe]
jwe
parents: 2457
diff changeset
34 octave_value_typeinfo::init_tab_sz (16);
26e9ee533d87 [project @ 1996-11-07 17:46:14 by jwe]
jwe
parents: 2457
diff changeset
35
26e9ee533d87 [project @ 1996-11-07 17:46:14 by jwe]
jwe
parents: 2457
diff changeset
36 octave_value_typeinfo *
26e9ee533d87 [project @ 1996-11-07 17:46:14 by jwe]
jwe
parents: 2457
diff changeset
37 octave_value_typeinfo::instance (0);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
38
4515
228d2d5b6d66 [project @ 2003-09-19 21:53:15 by jwe]
jwe
parents: 4508
diff changeset
39 #include <Array.h>
228d2d5b6d66 [project @ 2003-09-19 21:53:15 by jwe]
jwe
parents: 4508
diff changeset
40 #include <Array3.h>
228d2d5b6d66 [project @ 2003-09-19 21:53:15 by jwe]
jwe
parents: 4508
diff changeset
41
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
42 bool
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
43 octave_value_typeinfo::instance_ok (void)
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
44 {
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
45 bool retval = true;
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
46 if (! instance)
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
47 instance = new octave_value_typeinfo ();
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
48
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
49 if (! instance)
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
50 {
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
51 ::error ("unable to create value type info object!");
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
52
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
53 retval = false;
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
54 }
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
55
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
56 return retval;
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
57 }
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
58
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
59 int
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4594
diff changeset
60 octave_value_typeinfo::register_type (const std::string& t_name,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
61 const std::string& c_name,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
62 const octave_value& val)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
63 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
64 return (instance_ok ())
4640
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
65 ? instance->do_register_type (t_name, c_name, val) : -1;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
66 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
67
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
68 bool
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
69 octave_value_typeinfo::register_unary_class_op (octave_value::unary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
70 octave_value_typeinfo::unary_class_op_fcn f)
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
71 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
72 return (instance_ok ())
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
73 ? instance->do_register_unary_class_op (op, f) : false;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
74 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
75
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
76 bool
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
77 octave_value_typeinfo::register_unary_op (octave_value::unary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
78 int t, octave_value_typeinfo::unary_op_fcn f)
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
79 {
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
80 return (instance_ok ())
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
81 ? instance->do_register_unary_op (op, t, f) : false;
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
82 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
83
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
84 bool
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
85 octave_value_typeinfo::register_non_const_unary_op (octave_value::unary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
86 int t,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
87 octave_value_typeinfo::non_const_unary_op_fcn f)
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
88 {
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
89 return (instance_ok ())
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
90 ? instance->do_register_non_const_unary_op (op, t, f) : false;
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
91 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
92
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
93 bool
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
94 octave_value_typeinfo::register_binary_class_op (octave_value::binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
95 octave_value_typeinfo::binary_class_op_fcn f)
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
96 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
97 return (instance_ok ())
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
98 ? instance->do_register_binary_class_op (op, f) : false;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
99 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
100
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
101 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
102 octave_value_typeinfo::register_binary_op (octave_value::binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
103 int t1, int t2,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
104 octave_value_typeinfo::binary_op_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
105 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
106 return (instance_ok ())
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
107 ? instance->do_register_binary_op (op, t1, t2, f) : false;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
108 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
109
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
110 bool
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
111 octave_value_typeinfo::register_binary_class_op (octave_value::compound_binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
112 octave_value_typeinfo::binary_class_op_fcn f)
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
113 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
114 return (instance_ok ())
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
115 ? instance->do_register_binary_class_op (op, f) : false;
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
116 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
117
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
118 bool
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
119 octave_value_typeinfo::register_binary_op (octave_value::compound_binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
120 int t1, int t2,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
121 octave_value_typeinfo::binary_op_fcn f)
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
122 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
123 return (instance_ok ())
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
124 ? instance->do_register_binary_op (op, t1, t2, f) : false;
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
125 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
126
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
127 bool
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
128 octave_value_typeinfo::register_cat_op (int t1, int t2, octave_value_typeinfo::cat_op_fcn f)
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
129 {
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
130 return (instance_ok ())
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
131 ? instance->do_register_cat_op (t1, t2, f) : false;
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
132 }
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
133
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
134 bool
2882
05926e1b367d [project @ 1997-04-24 09:48:59 by jwe]
jwe
parents: 2847
diff changeset
135 octave_value_typeinfo::register_assign_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
136 int t_lhs, int t_rhs,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
137 octave_value_typeinfo::assign_op_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
138 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
139 return (instance_ok ())
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
140 ? instance->do_register_assign_op (op, t_lhs, t_rhs, f) : -1;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
141 }
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 bool
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
144 octave_value_typeinfo::register_assignany_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
145 int t_lhs, octave_value_typeinfo::assignany_op_fcn f)
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
146 {
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
147 return (instance_ok ())
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
148 ? instance->do_register_assignany_op (op, t_lhs, f) : -1;
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
149 }
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
150
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
151 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
152 octave_value_typeinfo::register_pref_assign_conv (int t_lhs, int t_rhs,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
153 int t_result)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
154 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
155 return (instance_ok ())
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
156 ? instance->do_register_pref_assign_conv (t_lhs, t_rhs, t_result) : false;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
157 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
158
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
159 bool
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
160 octave_value_typeinfo::register_type_conv_op (int t, int t_result,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
161 octave_base_value::type_conv_fcn f)
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
162 {
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
163 return (instance_ok ())
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
164 ? instance->do_register_type_conv_op (t, t_result, f) : false;
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
165 }
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
166
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
167 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
168 octave_value_typeinfo::register_widening_op (int t, int t_result,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
169 octave_base_value::type_conv_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
170 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
171 return (instance_ok ())
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2882
diff changeset
172 ? instance->do_register_widening_op (t, t_result, f) : false;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
173 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
174
5775
ace8d8d26933 [project @ 2006-04-24 19:13:06 by jwe]
jwe
parents: 5759
diff changeset
175 // FIXME -- we should also store all class names and provide a
4687
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4640
diff changeset
176 // way to list them (calling class with nargin == 0?).
e95c86d48732 [project @ 2004-01-06 21:53:34 by jwe]
jwe
parents: 4640
diff changeset
177
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
178 int
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4594
diff changeset
179 octave_value_typeinfo::do_register_type (const std::string& t_name,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
180 const std::string& /* c_name */,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
181 const octave_value& val)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
182 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
183 int i = 0;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
184
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
185 for (i = 0; i < num_types; i++)
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4594
diff changeset
186 if (t_name == types (i))
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
187 return i;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
188
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
189 int len = types.length ();
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
190
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
191 if (i == len)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
192 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
193 len *= 2;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
194
10350
12884915a8e4 merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents: 10315
diff changeset
195 types.resize (len, 1, std::string ());
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
196
10350
12884915a8e4 merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents: 10315
diff changeset
197 vals.resize (len, 1, octave_value ());
4640
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
198
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
199 unary_ops.resize (static_cast<int> (octave_value::num_unary_ops), len, 0);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
200
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
201 non_const_unary_ops.resize
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
202 (static_cast<int> (octave_value::num_unary_ops), len, 0);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
203
2800
9aeba8e006a4 [project @ 1997-03-09 09:50:20 by jwe]
jwe
parents: 2479
diff changeset
204 binary_ops.resize (static_cast<int> (octave_value::num_binary_ops),
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
205 len, len, 0);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
206
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
207 compound_binary_ops.resize (static_cast<int> (octave_value::num_compound_binary_ops),
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
208 len, len, 0);
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
209
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
210 cat_ops.resize (len, len, 0);
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
211
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
212 assign_ops.resize (static_cast<int> (octave_value::num_assign_ops), len, len, 0);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
213
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
214 assignany_ops.resize (static_cast<int> (octave_value::num_assign_ops), len, 0);
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
215
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
216 pref_assign_conv.resize (len, len, -1);
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
217
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
218 type_conv_ops.resize (len, len, 0);
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
219
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
220 widening_ops.resize (len, len, 0);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
221 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
222
4612
d44675070f1a [project @ 2003-11-14 19:49:56 by jwe]
jwe
parents: 4594
diff changeset
223 types (i) = t_name;
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
224
4640
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
225 vals (i) = val;
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
226
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
227 num_types++;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
228
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
229 return i;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
230 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
231
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
232 bool
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
233 octave_value_typeinfo::do_register_unary_class_op (octave_value::unary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
234 octave_value_typeinfo::unary_class_op_fcn f)
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
235 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
236 if (lookup_unary_class_op (op))
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
237 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
238 std::string op_name = octave_value::unary_op_as_string (op);
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
239
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
240 warning ("duplicate unary operator `%s' for class dispatch",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
241 op_name.c_str ());
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
242 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
243
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
244 unary_class_ops.checkelem (static_cast<int> (op)) = reinterpret_cast<void *> (f);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
245
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
246 return false;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
247 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
248
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
249 bool
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
250 octave_value_typeinfo::do_register_unary_op (octave_value::unary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
251 int t, octave_value_typeinfo::unary_op_fcn f)
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
252 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
253 if (lookup_unary_op (op, t))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
254 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
255 std::string op_name = octave_value::unary_op_as_string (op);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
256 std::string type_name = types(t);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
257
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
258 warning ("duplicate unary operator `%s' for type `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
259 op_name.c_str (), type_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
260 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
261
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
262 unary_ops.checkelem (static_cast<int> (op), t) = reinterpret_cast<void *> (f);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
263
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
264 return false;
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
265 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
266
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
267 bool
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
268 octave_value_typeinfo::do_register_non_const_unary_op
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
269 (octave_value::unary_op op, int t, octave_value_typeinfo::non_const_unary_op_fcn f)
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
270 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
271 if (lookup_non_const_unary_op (op, t))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
272 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
273 std::string op_name = octave_value::unary_op_as_string (op);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
274 std::string type_name = types(t);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
275
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
276 warning ("duplicate unary operator `%s' for type `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
277 op_name.c_str (), type_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
278 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
279
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
280 non_const_unary_ops.checkelem (static_cast<int> (op), t) = reinterpret_cast<void *> (f);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
281
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
282 return false;
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
283 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
284
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
285 bool
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
286 octave_value_typeinfo::do_register_binary_class_op (octave_value::binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
287 octave_value_typeinfo::binary_class_op_fcn f)
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
288 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
289 if (lookup_binary_class_op (op))
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
290 {
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
291 std::string op_name = octave_value::binary_op_as_string (op);
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
292
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
293 warning ("duplicate binary operator `%s' for class dispatch",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
294 op_name.c_str ());
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
295 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
296
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
297 binary_class_ops.checkelem (static_cast<int> (op)) = reinterpret_cast<void *> (f);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
298
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
299 return false;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
300 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
301
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
302 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
303 octave_value_typeinfo::do_register_binary_op (octave_value::binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
304 int t1, int t2,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
305 octave_value_typeinfo::binary_op_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
306 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
307 if (lookup_binary_op (op, t1, t2))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
308 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
309 std::string op_name = octave_value::binary_op_as_string (op);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
310 std::string t1_name = types(t1);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
311 std::string t2_name = types(t2);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
312
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
313 warning ("duplicate binary operator `%s' for types `%s' and `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
314 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
315 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
316
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
317 binary_ops.checkelem (static_cast<int> (op), t1, t2) = reinterpret_cast<void *> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
318
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
319 return false;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
320 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
321
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
322 bool
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
323 octave_value_typeinfo::do_register_binary_class_op (octave_value::compound_binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
324 octave_value_typeinfo::binary_class_op_fcn f)
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
325 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
326 if (lookup_binary_class_op (op))
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
327 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
328 std::string op_name = octave_value::binary_op_fcn_name (op);
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
329
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
330 warning ("duplicate compound binary operator `%s' for class dispatch",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
331 op_name.c_str ());
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
332 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
333
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
334 compound_binary_class_ops.checkelem (static_cast<int> (op)) = reinterpret_cast<void *> (f);
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
335
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
336 return false;
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
337 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
338
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
339 bool
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
340 octave_value_typeinfo::do_register_binary_op (octave_value::compound_binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
341 int t1, int t2,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
342 octave_value_typeinfo::binary_op_fcn f)
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
343 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
344 if (lookup_binary_op (op, t1, t2))
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
345 {
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
346 std::string op_name = octave_value::binary_op_fcn_name (op);
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
347 std::string t1_name = types(t1);
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
348 std::string t2_name = types(t2);
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
349
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
350 warning ("duplicate compound binary operator `%s' for types `%s' and `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
351 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
352 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
353
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
354 compound_binary_ops.checkelem (static_cast<int> (op), t1, t2) = reinterpret_cast<void *> (f);
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
355
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
356 return false;
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
357 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
358
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
359 bool
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
360 octave_value_typeinfo::do_register_cat_op (int t1, int t2, octave_value_typeinfo::cat_op_fcn f)
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
361 {
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
362 if (lookup_cat_op (t1, t2))
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
363 {
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
364 std::string t1_name = types(t1);
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
365 std::string t2_name = types(t2);
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
366
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
367 warning ("duplicate concatenation operator for types `%s' and `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
368 t1_name.c_str (), t1_name.c_str ());
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
369 }
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
370
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
371 cat_ops.checkelem (t1, t2) = reinterpret_cast<void *> (f);
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
372
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
373 return false;
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
374 }
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
375
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
376 bool
2882
05926e1b367d [project @ 1997-04-24 09:48:59 by jwe]
jwe
parents: 2847
diff changeset
377 octave_value_typeinfo::do_register_assign_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
378 int t_lhs, int t_rhs,
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
379 octave_value_typeinfo::assign_op_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
380 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
381 if (lookup_assign_op (op, t_lhs, t_rhs))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
382 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
383 std::string op_name = octave_value::assign_op_as_string (op);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
384 std::string t_lhs_name = types(t_lhs);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
385 std::string t_rhs_name = types(t_rhs);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
386
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
387 warning ("duplicate assignment operator `%s' for types `%s' and `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
388 op_name.c_str (), t_lhs_name.c_str (), t_rhs_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
389 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
390
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
391 assign_ops.checkelem (static_cast<int> (op), t_lhs, t_rhs) = reinterpret_cast<void *> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
392
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
393 return false;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
394 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
395
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
396 bool
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
397 octave_value_typeinfo::do_register_assignany_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
398 int t_lhs, octave_value_typeinfo::assignany_op_fcn f)
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
399 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
400 if (lookup_assignany_op (op, t_lhs))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
401 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
402 std::string op_name = octave_value::assign_op_as_string (op);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
403 std::string t_lhs_name = types(t_lhs);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
404
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
405 warning ("duplicate assignment operator `%s' for types `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
406 op_name.c_str (), t_lhs_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
407 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
408
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
409 assignany_ops.checkelem (static_cast<int> (op), t_lhs) = reinterpret_cast<void *> (f);
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
410
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
411 return false;
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
412 }
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
413
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
414 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
415 octave_value_typeinfo::do_register_pref_assign_conv (int t_lhs, int t_rhs,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
416 int t_result)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
417 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
418 if (lookup_pref_assign_conv (t_lhs, t_rhs) >= 0)
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
419 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
420 std::string t_lhs_name = types(t_lhs);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
421 std::string t_rhs_name = types(t_rhs);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
422
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
423 warning ("overriding assignment conversion for types `%s' and `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
424 t_lhs_name.c_str (), t_rhs_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
425 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
426
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
427 pref_assign_conv.checkelem (t_lhs, t_rhs) = t_result;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
428
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
429 return false;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
430 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
431
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
432 bool
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
433 octave_value_typeinfo::do_register_type_conv_op
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
434 (int t, int t_result, octave_base_value::type_conv_fcn f)
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
435 {
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
436 if (lookup_type_conv_op (t, t_result))
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
437 {
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
438 std::string t_name = types(t);
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
439 std::string t_result_name = types(t_result);
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
440
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
441 warning ("overriding type conversion op for `%s' to `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
442 t_name.c_str (), t_result_name.c_str ());
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
443 }
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
444
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
445 type_conv_ops.checkelem (t, t_result) = reinterpret_cast<void *> (f);
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
446
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
447 return false;
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
448 }
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
449
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
450 bool
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
451 octave_value_typeinfo::do_register_widening_op
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
452 (int t, int t_result, octave_base_value::type_conv_fcn f)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
453 {
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
454 if (lookup_widening_op (t, t_result))
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
455 {
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
456 std::string t_name = types(t);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
457 std::string t_result_name = types(t_result);
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
458
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
459 warning ("overriding widening op for `%s' to `%s'",
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
460 t_name.c_str (), t_result_name.c_str ());
4508
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
461 }
2bc437206787 [project @ 2003-09-11 01:06:43 by jwe]
jwe
parents: 4192
diff changeset
462
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
463 widening_ops.checkelem (t, t_result) = reinterpret_cast<void *> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
464
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
465 return false;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
466 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
467
4640
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
468 octave_value
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
469 octave_value_typeinfo::do_lookup_type (const std::string& nm)
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
470 {
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
471 octave_value retval;
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
472
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
473 for (int i = 0; i < num_types; i++)
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
474 {
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
475 if (nm == types(i))
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
476 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
477 retval = vals(i);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
478 retval.make_unique ();
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
479 break;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
480 }
4640
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
481 }
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
482
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
483 return retval;
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
484 }
2d237a76dbdd [project @ 2003-11-22 11:24:44 by jwe]
jwe
parents: 4625
diff changeset
485
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
486 octave_value_typeinfo::unary_class_op_fcn
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
487 octave_value_typeinfo::do_lookup_unary_class_op (octave_value::unary_op op)
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
488 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
489 void *f = unary_class_ops.checkelem (static_cast<int> (op));
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
490 return reinterpret_cast<octave_value_typeinfo::unary_class_op_fcn> (f);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
491 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
492
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
493 octave_value_typeinfo::unary_op_fcn
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
494 octave_value_typeinfo::do_lookup_unary_op (octave_value::unary_op op, int t)
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
495 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
496 void *f = unary_ops.checkelem (static_cast<int> (op), t);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
497 return reinterpret_cast<octave_value_typeinfo::unary_op_fcn> (f);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
498 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
499
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
500 octave_value_typeinfo::non_const_unary_op_fcn
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
501 octave_value_typeinfo::do_lookup_non_const_unary_op
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
502 (octave_value::unary_op op, int t)
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
503 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
504 void *f = non_const_unary_ops.checkelem (static_cast<int> (op), t);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
505 return reinterpret_cast<octave_value_typeinfo::non_const_unary_op_fcn> (f);
3203
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
506 }
bc61b0e8d60e [project @ 1998-10-30 20:26:27 by jwe]
jwe
parents: 3196
diff changeset
507
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
508 octave_value_typeinfo::binary_class_op_fcn
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
509 octave_value_typeinfo::do_lookup_binary_class_op (octave_value::binary_op op)
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
510 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
511 void *f = binary_class_ops.checkelem (static_cast<int> (op));
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
512 return reinterpret_cast<octave_value_typeinfo::binary_class_op_fcn> (f);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
513 }
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
514
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
515 octave_value_typeinfo::binary_op_fcn
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
516 octave_value_typeinfo::do_lookup_binary_op (octave_value::binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
517 int t1, int t2)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
518 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
519 void *f = binary_ops.checkelem (static_cast<int> (op), t1, t2);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
520 return reinterpret_cast<octave_value_typeinfo::binary_op_fcn> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
521 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
522
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
523 octave_value_typeinfo::binary_class_op_fcn
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
524 octave_value_typeinfo::do_lookup_binary_class_op (octave_value::compound_binary_op op)
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
525 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
526 void *f = compound_binary_class_ops.checkelem (static_cast<int> (op));
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
527 return reinterpret_cast<octave_value_typeinfo::binary_class_op_fcn> (f);
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
528 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
529
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
530 octave_value_typeinfo::binary_op_fcn
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
531 octave_value_typeinfo::do_lookup_binary_op (octave_value::compound_binary_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
532 int t1, int t2)
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
533 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
534 void *f = compound_binary_ops.checkelem (static_cast<int> (op), t1, t2);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
535 return reinterpret_cast<octave_value_typeinfo::binary_op_fcn> (f);
7800
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
536 }
5861b95e9879 support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents: 7433
diff changeset
537
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
538 octave_value_typeinfo::cat_op_fcn
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
539 octave_value_typeinfo::do_lookup_cat_op (int t1, int t2)
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
540 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
541 void *f = cat_ops.checkelem (t1, t2);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
542 return reinterpret_cast<octave_value_typeinfo::cat_op_fcn> (f);
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
543 }
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4901
diff changeset
544
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
545 octave_value_typeinfo::assign_op_fcn
2882
05926e1b367d [project @ 1997-04-24 09:48:59 by jwe]
jwe
parents: 2847
diff changeset
546 octave_value_typeinfo::do_lookup_assign_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
547 int t_lhs, int t_rhs)
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
548 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
549 void *f = assign_ops.checkelem (static_cast<int> (op), t_lhs, t_rhs);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
550 return reinterpret_cast<octave_value_typeinfo::assign_op_fcn> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
551 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
552
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
553 octave_value_typeinfo::assignany_op_fcn
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
554 octave_value_typeinfo::do_lookup_assignany_op (octave_value::assign_op op,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
555 int t_lhs)
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
556 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
557 void *f = assignany_ops.checkelem (static_cast<int> (op), t_lhs);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
558 return reinterpret_cast<octave_value_typeinfo::assignany_op_fcn> (f);
3196
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
559 }
3ac3e8edc258 [project @ 1998-10-28 23:04:39 by jwe]
jwe
parents: 3014
diff changeset
560
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
561 int
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
562 octave_value_typeinfo::do_lookup_pref_assign_conv (int t_lhs, int t_rhs)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
563 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
564 return pref_assign_conv.checkelem (t_lhs, t_rhs);
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
565 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
566
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
567 octave_base_value::type_conv_fcn
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
568 octave_value_typeinfo::do_lookup_type_conv_op (int t, int t_result)
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
569 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
570 void *f = type_conv_ops.checkelem (t, t_result);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
571 return reinterpret_cast<octave_base_value::type_conv_fcn> (f);
4901
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
572 }
35bfb4e0b96b [project @ 2004-06-14 18:33:02 by jwe]
jwe
parents: 4687
diff changeset
573
5759
ce79d238f142 [project @ 2006-04-13 13:04:32 by jwe]
jwe
parents: 5307
diff changeset
574 octave_base_value::type_conv_fcn
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
575 octave_value_typeinfo::do_lookup_widening_op (int t, int t_result)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
576 {
9223
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
577 void *f = widening_ops.checkelem (t, t_result);
902a4597dce8 use Array<void *> in ov-typeinfo.h
Jaroslav Hajek <highegg@gmail.com>
parents: 9219
diff changeset
578 return reinterpret_cast<octave_base_value::type_conv_fcn> (f);
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
579 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
580
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
581 string_vector
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
582 octave_value_typeinfo::do_installed_type_names (void)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
583 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
584 string_vector retval (num_types);
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
585
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
586 for (int i = 0;i < num_types; i++)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
587 retval (i) = types (i);
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
588
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
589 return retval;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
590 }
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
591
2457
5be3f6f5986a [project @ 1996-11-03 02:54:44 by jwe]
jwe
parents: 2427
diff changeset
592 DEFUN (typeinfo, args, ,
3445
c3eed8ac845a [project @ 2000-01-17 09:06:51 by jwe]
jwe
parents: 3203
diff changeset
593 "-*- texinfo -*-\n\
c3eed8ac845a [project @ 2000-01-17 09:06:51 by jwe]
jwe
parents: 3203
diff changeset
594 @deftypefn {Built-in Function} {} typeinfo (@var{expr})\n\
2822
7cacd6c766d2 [project @ 1997-03-24 19:13:01 by jwe]
jwe
parents: 2800
diff changeset
595 \n\
3445
c3eed8ac845a [project @ 2000-01-17 09:06:51 by jwe]
jwe
parents: 3203
diff changeset
596 Return the type of the expression @var{expr}, as a string. If\n\
8474
7be5917f181a [docs] @var{EXPR} => @var{expr}
Brian Gough <bjg@gnu.org>
parents: 7800
diff changeset
597 @var{expr} is omitted, return an array of strings containing all the\n\
3445
c3eed8ac845a [project @ 2000-01-17 09:06:51 by jwe]
jwe
parents: 3203
diff changeset
598 currently installed data types.\n\
c3eed8ac845a [project @ 2000-01-17 09:06:51 by jwe]
jwe
parents: 3203
diff changeset
599 @end deftypefn")
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
600 {
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
601 octave_value retval;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
602
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
603 int nargin = args.length ();
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
604
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
605 if (nargin == 0)
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
606 retval = octave_value_typeinfo::installed_type_names ();
2822
7cacd6c766d2 [project @ 1997-03-24 19:13:01 by jwe]
jwe
parents: 2800
diff changeset
607 else if (nargin == 1)
7cacd6c766d2 [project @ 1997-03-24 19:13:01 by jwe]
jwe
parents: 2800
diff changeset
608 retval = args(0).type_name ();
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
609 else
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5775
diff changeset
610 print_usage ();
2376
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
611
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
612 return retval;
2142216bf85a [project @ 1996-10-12 01:39:07 by jwe]
jwe
parents:
diff changeset
613 }