23 #if !defined (octave_ov_type_conv_h)
24 #define octave_ov_type_conv_h 1
34 if (t_arg == t_result || arg.
class_name () == name)
77 #define OCTAVE_TYPE_CONV_BODY3(NAME, MATRIX_RESULT_T, SCALAR_RESULT_T) \
79 octave_value retval; \
81 int nargin = args.length (); \
85 const octave_value arg = args(0); \
87 int t_result = MATRIX_RESULT_T::static_type_id (); \
89 retval = octave_type_conv_body (arg, #NAME, t_result); \
90 if (retval.is_undefined ()) \
92 std::string arg_tname = arg.type_name (); \
94 std::string result_tname = arg.numel () == 1 \
95 ? SCALAR_RESULT_T::static_type_name () \
96 : MATRIX_RESULT_T::static_type_name (); \
98 gripe_invalid_conversion (arg_tname, result_tname); \
106 #define OCTAVE_TYPE_CONV_BODY(NAME) \
107 OCTAVE_TYPE_CONV_BODY3 (NAME, octave_ ## NAME ## _matrix, \
108 octave_ ## NAME ## _scalar)
static octave_base_value::type_conv_fcn lookup_type_conv_op(int t, int t_result)
octave_base_value::type_conv_info numeric_conversion_function(void) const
octave_base_value *(* type_conv_fcn)(const octave_base_value &)
std::string class_name(void) const
static octave_value octave_type_conv_body(const octave_value &arg, const std::string &name, int t_result)
octave_base_value * internal_rep(void) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))