Mercurial > octave
diff libinterp/octave-value/ov-class.cc @ 23587:0c468af9dc00
maint: Deprecate is_object and replace with isobject.
* ov.h (is_object): Use OCTAVE_DEPRECATED macro around function.
* ov.h (isobject): New function.
* bsxfun.cc, cellfun.cc, data.cc, ls-mat5.cc, oct-stream.cc, symtab.h,
variables.cc, ov-base.h, ov-class.cc, ov-class.h, ov-classdef.h,
ov-oncleanup.h, ov-struct.cc, ov.cc, ov.h, op-class.cc, pt-arg-list.cc,
pt-eval.cc, pt-tm-const.cc:
Replace instances of is_object with isobject.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 13 Jun 2017 11:25:31 -0700 |
parents | f6c5db0a02e7 |
children | 80e3bfb7bd5a |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-class.cc Tue Jun 13 10:20:55 2017 -0700 +++ b/libinterp/octave-value/ov-class.cc Tue Jun 13 11:25:31 2017 -0700 @@ -80,7 +80,7 @@ { octave_value parent = parents(idx); - if (! parent.is_object ()) + if (! parent.isobject ()) error ("parents must be objects"); std::string pcnm = parent.class_name (); @@ -729,7 +729,7 @@ } else { - if (t_rhs.is_object () || t_rhs.isstruct ()) + if (t_rhs.isobject () || t_rhs.isstruct ()) { octave_map rhs_map = t_rhs.xmap_value ("invalid class assignment"); @@ -810,7 +810,7 @@ octave_value_list tmp = octave::feval (meth.function_value (), args, 1); - if (tmp(0).is_object ()) + if (tmp(0).isobject ()) error ("subsindex function must return a valid index vector"); // Index vector returned by subsindex is zero based @@ -1101,7 +1101,7 @@ { std::string key = map.key (it); Cell val = map.contents (it); - if (val(0).is_object ()) + if (val(0).isobject ()) { dbgstr = "blork"; if (key == val(0).class_name ()) @@ -1643,7 +1643,7 @@ octave_class::exemplar_info::exemplar_info (const octave_value& obj) : field_names (), parent_class_names () { - if (! obj.is_object ()) + if (! obj.isobject ()) error ("invalid call to exemplar_info constructor"); octave_map m = obj.map_value (); @@ -1659,7 +1659,7 @@ octave_class::exemplar_info::compare (const octave_value& obj) const { - if (! obj.is_object ()) + if (! obj.isobject ()) error ("invalid comparison of class exemplar to non-class object"); if (nfields () != obj.nfields ()) @@ -1890,7 +1890,7 @@ octave_value arg = args(0); - if (arg.is_object ()) + if (arg.isobject ()) return ovl (Cell (arg.parent_class_names ())); else return ovl (Cell ()); @@ -1906,7 +1906,7 @@ if (args.length () != 1) print_usage (); - return ovl (args(0).is_object ()); + return ovl (args(0).isobject ()); } DEFMETHOD (ismethod, interp, args, , @@ -1925,7 +1925,7 @@ std::string class_name; - if (arg.is_object ()) + if (arg.isobject ()) class_name = arg.class_name (); else if (arg.is_string ()) class_name = arg.string_value (); @@ -1957,7 +1957,7 @@ std::string class_name; - if (arg.is_object ()) + if (arg.isobject ()) class_name = arg.class_name (); else if (arg.is_string ()) class_name = arg.string_value ();