comparison src/ov-typeinfo.cc @ 2882:05926e1b367d

[project @ 1997-04-24 09:48:59 by jwe]
author jwe
date Thu, 24 Apr 1997 09:51:05 +0000
parents 8b262e771614
children 66ef74ee5d9f
comparison
equal deleted inserted replaced
2881:b99a6a2619aa 2882:05926e1b367d
49 template class Array2<binary_op_fcn>; 49 template class Array2<binary_op_fcn>;
50 template class Array3<binary_op_fcn>; 50 template class Array3<binary_op_fcn>;
51 51
52 template class Array<assign_op_fcn>; 52 template class Array<assign_op_fcn>;
53 template class Array2<assign_op_fcn>; 53 template class Array2<assign_op_fcn>;
54 template class Array3<assign_op_fcn>;
54 55
55 template class Array<type_conv_fcn>; 56 template class Array<type_conv_fcn>;
56 template class Array2<type_conv_fcn>; 57 template class Array2<type_conv_fcn>;
57 58
58 int 59 int
74 75
75 return instance->do_register_binary_op (op, t1, t2, f); 76 return instance->do_register_binary_op (op, t1, t2, f);
76 } 77 }
77 78
78 bool 79 bool
79 octave_value_typeinfo::register_assign_op (int t_lhs, int t_rhs, 80 octave_value_typeinfo::register_assign_op (octave_value::assign_op op,
81 int t_lhs, int t_rhs,
80 assign_op_fcn f) 82 assign_op_fcn f)
81 { 83 {
82 if (! instance) 84 if (! instance)
83 instance = new octave_value_typeinfo (); 85 instance = new octave_value_typeinfo ();
84 86
85 return instance->do_register_assign_op (t_lhs, t_rhs, f); 87 return instance->do_register_assign_op (op, t_lhs, t_rhs, f);
86 } 88 }
87 89
88 bool 90 bool
89 octave_value_typeinfo::register_pref_assign_conv (int t_lhs, int t_rhs, 91 octave_value_typeinfo::register_pref_assign_conv (int t_lhs, int t_rhs,
90 int t_result) 92 int t_result)
123 types.resize (len, string ()); 125 types.resize (len, string ());
124 126
125 binary_ops.resize (static_cast<int> (octave_value::num_binary_ops), 127 binary_ops.resize (static_cast<int> (octave_value::num_binary_ops),
126 len, len, static_cast<binary_op_fcn> (0)); 128 len, len, static_cast<binary_op_fcn> (0));
127 129
128 assign_ops.resize (len, len, static_cast<assign_op_fcn> (0)); 130 assign_ops.resize (static_cast<int> (octave_value::num_assign_ops),
131 len, len, static_cast<assign_op_fcn> (0));
129 132
130 pref_assign_conv.resize (len, len, -1); 133 pref_assign_conv.resize (len, len, -1);
131 134
132 widening_ops.resize (len, len, static_cast<type_conv_fcn> (0)); 135 widening_ops.resize (len, len, static_cast<type_conv_fcn> (0));
133 } 136 }
148 151
149 return false; 152 return false;
150 } 153 }
151 154
152 bool 155 bool
153 octave_value_typeinfo::do_register_assign_op (int t_lhs, int t_rhs, 156 octave_value_typeinfo::do_register_assign_op (octave_value::assign_op op,
157 int t_lhs, int t_rhs,
154 assign_op_fcn f) 158 assign_op_fcn f)
155 { 159 {
156 assign_ops.checkelem (t_lhs, t_rhs) = f; 160 assign_ops.checkelem (static_cast<int> (op), t_lhs, t_rhs) = f;
157 161
158 return false; 162 return false;
159 } 163 }
160 164
161 bool 165 bool
184 { 188 {
185 return binary_ops.checkelem (static_cast<int> (op), t1, t2); 189 return binary_ops.checkelem (static_cast<int> (op), t1, t2);
186 } 190 }
187 191
188 assign_op_fcn 192 assign_op_fcn
189 octave_value_typeinfo::do_lookup_assign_op (int t_lhs, int t_rhs) 193 octave_value_typeinfo::do_lookup_assign_op (octave_value::assign_op op,
190 { 194 int t_lhs, int t_rhs)
191 return assign_ops.checkelem (t_lhs, t_rhs); 195 {
196 return assign_ops.checkelem (static_cast<int> (op), t_lhs, t_rhs);
192 } 197 }
193 198
194 int 199 int
195 octave_value_typeinfo::do_lookup_pref_assign_conv (int t_lhs, int t_rhs) 200 octave_value_typeinfo::do_lookup_pref_assign_conv (int t_lhs, int t_rhs)
196 { 201 {