55 ::error (
"unable to create value type info object!");
65 const std::string& c_name,
142 int t_lhs,
int t_rhs,
193 if (t_name ==
types (i))
249 warning (
"duplicate unary operator '%s' for class dispatch",
254 =
reinterpret_cast<void *
> (
f);
267 std::string type_name =
types(t);
269 warning (
"duplicate unary operator '%s' for type '%s'",
270 op_name.c_str (), type_name.c_str ());
283 if (lookup_non_const_unary_op (op, t))
286 std::string type_name = types(t);
288 warning (
"duplicate unary operator '%s' for type '%s'",
289 op_name.c_str (), type_name.c_str ());
292 non_const_unary_ops.checkelem (static_cast<int> (op), t)
293 =
reinterpret_cast<void *
> (
f);
306 warning (
"duplicate binary operator '%s' for class dispatch",
311 =
reinterpret_cast<void *
> (
f);
324 std::string t1_name =
types(t1);
325 std::string t2_name =
types(t2);
327 warning (
"duplicate binary operator '%s' for types '%s' and '%s'",
328 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
332 =
reinterpret_cast<void *
> (
f);
345 warning (
"duplicate compound binary operator '%s' for class dispatch",
350 =
reinterpret_cast<void *
> (
f);
363 std::string t1_name =
types(t1);
364 std::string t2_name =
types(t2);
366 warning (
"duplicate compound binary operator '%s' for types '%s' and '%s'",
367 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
371 =
reinterpret_cast<void *
> (
f);
382 std::string t1_name =
types(t1);
383 std::string t2_name =
types(t2);
385 warning (
"duplicate concatenation operator for types '%s' and '%s'",
386 t1_name.c_str (), t1_name.c_str ());
396 int t_lhs,
int t_rhs,
402 std::string t_lhs_name =
types(t_lhs);
403 std::string t_rhs_name =
types(t_rhs);
405 warning (
"duplicate assignment operator '%s' for types '%s' and '%s'",
406 op_name.c_str (), t_lhs_name.c_str (), t_rhs_name.c_str ());
410 =
reinterpret_cast<void *
> (
f);
422 std::string t_lhs_name =
types(t_lhs);
424 warning (
"duplicate assignment operator '%s' for types '%s'",
425 op_name.c_str (), t_lhs_name.c_str ());
429 =
reinterpret_cast<void *
> (
f);
440 std::string t_lhs_name =
types(t_lhs);
441 std::string t_rhs_name =
types(t_rhs);
443 warning (
"overriding assignment conversion for types '%s' and '%s'",
444 t_lhs_name.c_str (), t_rhs_name.c_str ());
456 if (lookup_type_conv_op (t, t_result))
458 std::string t_name = types(t);
459 std::string t_result_name = types(t_result);
461 warning (
"overriding type conversion op for '%s' to '%s'",
462 t_name.c_str (), t_result_name.c_str ());
465 type_conv_ops.checkelem (t, t_result) =
reinterpret_cast<void *
> (
f);
474 if (lookup_widening_op (t, t_result))
476 std::string t_name = types(t);
477 std::string t_result_name = types(t_result);
479 warning (
"overriding widening op for '%s' to '%s'",
480 t_name.c_str (), t_result_name.c_str ());
483 widening_ops.checkelem (t, t_result) =
reinterpret_cast<void *
> (
f);
524 void *f = non_const_unary_ops.checkelem (static_cast<int> (op), t);
567 int t_lhs,
int t_rhs)
607 retval(i) =
types(i);
612 DEFUN (typeinfo, args, ,
614 @deftypefn {Built-in Function} {} typeinfo ()\n\
615 @deftypefnx {Built-in Function} {} typeinfo (@var{expr})\n\
617 Return the type of the expression @var{expr}, as a string.\n\
619 If @var{expr} is omitted, return a cell array of strings containing all the\n\
620 currently installed data types.\n\
621 @seealso{class, isa}\n\
626 int nargin = args.
length ();
630 else if (nargin == 1)
static bool register_pref_assign_conv(int, int, int)
static bool register_assign_op(octave_value::assign_op, int, int, assign_op_fcn)
static const int init_tab_sz
Array< void * > binary_ops
void(* non_const_unary_op_fcn)(octave_base_value &)
bool do_register_non_const_unary_op(octave_value::unary_op, int, non_const_unary_op_fcn)
bool do_register_type_conv_op(int, int, octave_base_value::type_conv_fcn)
octave_value(* binary_op_fcn)(const octave_base_value &, const octave_base_value &)
OCTINTERP_API void print_usage(void)
static std::string binary_op_as_string(binary_op)
static void cleanup_instance(void)
static string_vector installed_type_names(void)
cat_op_fcn do_lookup_cat_op(int, int)
Array< int > pref_assign_conv
Array< octave_value > vals
Array< void * > binary_class_ops
unary_op_fcn do_lookup_unary_op(octave_value::unary_op, int)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
unary_class_op_fcn do_lookup_unary_class_op(octave_value::unary_op)
static bool register_type_conv_op(int, int, octave_base_value::type_conv_fcn)
static bool register_unary_class_op(octave_value::unary_op, unary_class_op_fcn)
octave_value(* binary_class_op_fcn)(const octave_value &, const octave_value &)
static std::string assign_op_as_string(assign_op)
static binary_op_fcn lookup_binary_op(octave_value::binary_op op, int t1, int t2)
static int lookup_pref_assign_conv(int t_lhs, int t_rhs)
octave_base_value::type_conv_fcn do_lookup_widening_op(int, int)
bool do_register_binary_op(octave_value::binary_op, int, int, binary_op_fcn)
bool do_register_unary_op(octave_value::unary_op, int, unary_op_fcn)
static octave_value_typeinfo * instance
assignany_op_fcn do_lookup_assignany_op(octave_value::assign_op, int)
static unary_class_op_fcn lookup_unary_class_op(octave_value::unary_op op)
binary_class_op_fcn do_lookup_binary_class_op(octave_value::binary_op)
octave_value(* cat_op_fcn)(octave_base_value &, const octave_base_value &, const Array< octave_idx_type > &ra_idx)
non_const_unary_op_fcn do_lookup_non_const_unary_op(octave_value::unary_op, int)
F77_RET_T const double const double * f
octave_value(* unary_op_fcn)(const octave_base_value &)
string_vector do_installed_type_names(void)
static assignany_op_fcn lookup_assignany_op(octave_value::assign_op op, int t_lhs)
int do_lookup_pref_assign_conv(int, int)
Array< void * > non_const_unary_ops
static std::string binary_op_fcn_name(binary_op)
assign_op_fcn do_lookup_assign_op(octave_value::assign_op, int, int)
Array< void * > assignany_ops
void resize(const dim_vector &dv, const T &rfv)
Array< void * > unary_class_ops
static bool register_non_const_unary_op(octave_value::unary_op, int, non_const_unary_op_fcn)
bool do_register_assignany_op(octave_value::assign_op, int, assignany_op_fcn)
static bool register_binary_op(octave_value::binary_op, int, int, binary_op_fcn)
octave_idx_type length(void) const
static binary_class_op_fcn lookup_binary_class_op(octave_value::binary_op op)
bool do_register_assign_op(octave_value::assign_op, int, int, assign_op_fcn)
bool do_register_unary_class_op(octave_value::unary_op, unary_class_op_fcn)
bool do_register_pref_assign_conv(int, int, int)
Array< void * > type_conv_ops
void warning(const char *fmt,...)
octave_value(* assignany_op_fcn)(octave_base_value &, const octave_value_list &, const octave_value &)
bool do_register_widening_op(int, int, octave_base_value::type_conv_fcn)
std::string type_name(void) const
octave_idx_type length(void) const
Number of elements in the array.
octave_value(* assign_op_fcn)(octave_base_value &, const octave_value_list &, const octave_base_value &)
static bool register_widening_op(int, int, octave_base_value::type_conv_fcn)
bool do_register_binary_class_op(octave_value::binary_op, binary_class_op_fcn)
static cat_op_fcn lookup_cat_op(int t1, int t2)
octave_base_value *(* type_conv_fcn)(const octave_base_value &)
static bool register_cat_op(int, int, cat_op_fcn)
T & checkelem(octave_idx_type n)
Array< void * > unary_ops
static int register_type(const std::string &, const std::string &, const octave_value &)
Array< void * > assign_ops
octave_value(* unary_class_op_fcn)(const octave_value &)
int do_register_type(const std::string &, const std::string &, const octave_value &)
Array< void * > widening_ops
octave_base_value::type_conv_fcn do_lookup_type_conv_op(int, int)
octave_value_typeinfo(void)
octave_value do_lookup_type(const std::string &nm)
static assign_op_fcn lookup_assign_op(octave_value::assign_op op, int t_lhs, int t_rhs)
static std::string unary_op_as_string(unary_op)
static bool instance_ok(void)
Array< void * > compound_binary_ops
static bool register_binary_class_op(octave_value::binary_op, binary_class_op_fcn)
binary_op_fcn do_lookup_binary_op(octave_value::binary_op, int, int)
Array< std::string > types
bool do_register_cat_op(int, int, cat_op_fcn)
static bool register_unary_op(octave_value::unary_op, int, unary_op_fcn)
static unary_op_fcn lookup_unary_op(octave_value::unary_op op, int t)
static bool register_assignany_op(octave_value::assign_op, int, assignany_op_fcn)
Array< void * > compound_binary_class_ops