29 #if defined (HAVE_CONFIG_H)
54 oct_unop_default (
const octave_value& a,
const std::string& opname)
60 octave::symbol_table& symtab = interp.get_symbol_table ();
62 octave_value meth = symtab.find_method (opname, class_name);
81 if ((opname ==
"transpose") || (opname ==
"ctranspose"))
84 error (
"%s not defined for N-D objects of %s class", opname.c_str (),
91 error (
"%s method not defined for %s class", opname.c_str (),
100 v.parent_class_name_list ());
104 error (
"%s method not defined for %s class", opname.c_str (),
105 class_name.c_str ());
110 #define DEF_CLASS_UNOP(opname) \
111 static octave_value \
112 oct_unop_ ## opname (const octave_value& a) \
114 return oct_unop_default (a, #opname); \
122 #undef DEF_CLASS_UNOP
142 const std::string& opname)
146 octave::symbol_table& symtab = interp.get_symbol_table ();
154 && symtab.is_superiorto (
a2.
class_name (), dispatch_type)))
157 octave_value meth = symtab.find_method (opname, dispatch_type);
160 error (
"%s method not defined for %s class", opname.c_str (),
161 dispatch_type.c_str ());
174 #define DEF_CLASS_BINOP(opname) \
175 static octave_value \
176 oct_binop_ ## opname (const octave_value& a1, const octave_value& a2) \
178 return oct_binop_default (a1, a2, #opname); \
199 #undef DEF_CLASS_BINOP
230 OCTAVE_END_NAMESPACE(
octave)
virtual bool isobject() const
virtual std::string class_name() const
octave_idx_type length() const
bool is_classdef_object() const
bool is_undefined() const
std::string class_name() const
const octave_base_value & get_rep() const
octave_function * function_value(bool silent=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void() error(const char *fmt,...)
interpreter & __get_interpreter__()
#define DEF_CLASS_BINOP(opname)
Helper macro to define binary class operators.
void install_class_ops(octave::type_info &ti)
#define DEF_CLASS_UNOP(opname)
Helper macro to define unary class operators.
const octave_base_value & a2
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
#define OCTAVE_CAST_BASE_VALUE(T, T_VAL, BASE_VAL)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.