comparison libinterp/octave-value/ov-classdef.cc @ 19631:db92e7e28e1f

strip trailing whitespace from most source files * NEWS, doc/interpreter/contributors.in, doc/interpreter/func.txi, doc/interpreter/genpropdoc.m, doc/interpreter/octave_logo.eps, doc/interpreter/plot.txi, doc/interpreter/stmt.txi, examples/data/Makefile.am, libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc, libinterp/corefcn/error.cc, libinterp/corefcn/file-io.cc, libinterp/corefcn/gl-render.cc, libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h, libinterp/corefcn/load-path.cc, libinterp/corefcn/pr-output.cc, libinterp/corefcn/pt-jit.cc, libinterp/corefcn/strfind.cc, libinterp/corefcn/toplev.cc, libinterp/corefcn/toplev.h, libinterp/corefcn/urlwrite.cc, libinterp/corefcn/variables.cc, libinterp/octave-value/ov-classdef.cc, libinterp/octave-value/ov-classdef.h, libinterp/octave.cc, libinterp/parse-tree/lex.h, libinterp/parse-tree/oct-parse.in.yy, libinterp/parse-tree/pt-classdef.h, liboctave/system/file-ops.cc, liboctave/system/oct-env.cc, m4/acinclude.m4, scripts/deprecated/finite.m, scripts/deprecated/fmod.m, scripts/deprecated/fnmatch.m, scripts/deprecated/luinc.m, scripts/deprecated/octave_tmp_file_name.m, scripts/deprecated/syl.m, scripts/deprecated/usage.m, scripts/general/inputParser.m, scripts/general/interp1.m, scripts/general/interp2.m, scripts/general/interp3.m, scripts/general/isequal.m, scripts/general/private/__isequal__.m, scripts/geometry/voronoi.m, scripts/image/image.m, scripts/image/imshow.m, scripts/image/ind2rgb.m, scripts/linear-algebra/bandwidth.m, scripts/linear-algebra/isbanded.m, scripts/miscellaneous/bzip2.m, scripts/miscellaneous/cast.m, scripts/miscellaneous/copyfile.m, scripts/miscellaneous/delete.m, scripts/miscellaneous/fullfile.m, scripts/miscellaneous/getappdata.m, scripts/miscellaneous/gunzip.m, scripts/miscellaneous/isappdata.m, scripts/miscellaneous/ls.m, scripts/miscellaneous/mex.m, scripts/miscellaneous/movefile.m, scripts/miscellaneous/orderfields.m, scripts/miscellaneous/recycle.m, scripts/miscellaneous/rmappdata.m, scripts/miscellaneous/setfield.m, scripts/miscellaneous/symvar.m, scripts/miscellaneous/tar.m, scripts/miscellaneous/tmpnam.m, scripts/miscellaneous/unpack.m, scripts/miscellaneous/ver.m, scripts/miscellaneous/what.m, scripts/miscellaneous/xor.m, scripts/miscellaneous/zip.m, scripts/optimization/fminbnd.m, scripts/optimization/sqp.m, scripts/path/private/getsavepath.m, scripts/path/savepath.m, scripts/pkg/pkg.m, scripts/pkg/private/installed_packages.m, scripts/plot/draw/plotyy.m, scripts/plot/draw/polar.m, scripts/plot/draw/private/__quiver__.m, scripts/plot/draw/private/__scatter__.m, scripts/plot/draw/private/__stem__.m, scripts/plot/draw/surface.m, scripts/plot/draw/surfnorm.m, scripts/plot/util/copyobj.m, scripts/plot/util/hgload.m, scripts/plot/util/hgsave.m, scripts/plot/util/isprop.m, scripts/plot/util/linkprop.m, scripts/plot/util/private/__go_draw_axes__.m, scripts/set/setdiff.m, scripts/set/union.m, scripts/signal/periodogram.m, scripts/sparse/eigs.m, scripts/sparse/ilu.m, scripts/sparse/qmr.m, scripts/sparse/sprand.m, scripts/sparse/sprandn.m, scripts/specfun/beta.m, scripts/specfun/ellipke.m, scripts/specfun/isprime.m, scripts/statistics/base/lscov.m, scripts/testfun/__run_test_suite__.m, scripts/testfun/test.m: Strip trailing whitespace.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:29:54 -0500
parents eb90f921bbc0
children 76478d2da117
comparison
equal deleted inserted replaced
19630:0e1f5a750d00 19631:db92e7e28e1f
409 } 409 }
410 } 410 }
411 else 411 else
412 error ("invalid property/method access in class `%s'", 412 error ("invalid property/method access in class `%s'",
413 cls.get_name ().c_str ()); 413 cls.get_name ().c_str ());
414 414
415 return false; 415 return false;
416 } 416 }
417 417
418 static bool 418 static bool
419 is_dummy_method (const octave_value& fcn) 419 is_dummy_method (const octave_value& fcn)
1392 { 1392 {
1393 cdef_class cls = get_class (); 1393 cdef_class cls = get_class ();
1394 1394
1395 if (cls.ok ()) 1395 if (cls.ok ())
1396 return cls.get_names (); 1396 return cls.get_names ();
1397 1397
1398 return string_vector (); 1398 return string_vector ();
1399 } 1399 }
1400 1400
1401 octave_value_list 1401 octave_value_list
1402 cdef_object_scalar::subsref (const std::string& type, 1402 cdef_object_scalar::subsref (const std::string& type,
1532 if (! error_state) 1532 if (! error_state)
1533 retval = to_ov (obj); 1533 retval = to_ov (obj);
1534 } 1534 }
1535 else 1535 else
1536 { 1536 {
1537 octave_value val = 1537 octave_value val =
1538 prop.get_value (obj, true, "subsasgn"); 1538 prop.get_value (obj, true, "subsasgn");
1539 1539
1540 if (! error_state) 1540 if (! error_state)
1541 { 1541 {
1542 std::list<octave_value_list> args (idx); 1542 std::list<octave_value_list> args (idx);
1898 arr.xelem (i) = obj.copy (); 1898 arr.xelem (i) = obj.copy ();
1899 } 1899 }
1900 } 1900 }
1901 } 1901 }
1902 } 1902 }
1903 1903
1904 bool cdef_object_scalar::is_constructed_for (const cdef_class& cls) const 1904 bool cdef_object_scalar::is_constructed_for (const cdef_class& cls) const
1905 { 1905 {
1906 return (is_constructed () 1906 return (is_constructed ()
1907 || ctor_list.find (cls) == ctor_list.end ()); 1907 || ctor_list.find (cls) == ctor_list.end ());
1908 } 1908 }
3115 ::error ("cannot reference properties of class `%s' for non-constructed object", 3115 ::error ("cannot reference properties of class `%s' for non-constructed object",
3116 cls.get_name ().c_str ()); 3116 cls.get_name ().c_str ());
3117 return retval; 3117 return retval;
3118 } 3118 }
3119 } 3119 }
3120 3120
3121 octave_value get_fcn = get ("GetMethod"); 3121 octave_value get_fcn = get ("GetMethod");
3122 3122
3123 // FIXME: should check whether we're already in get accessor method 3123 // FIXME: should check whether we're already in get accessor method
3124 3124
3125 if (get_fcn.is_empty () || is_method_executing (get_fcn, obj)) 3125 if (get_fcn.is_empty () || is_method_executing (get_fcn, obj))
3127 else 3127 else
3128 { 3128 {
3129 octave_value_list args; 3129 octave_value_list args;
3130 3130
3131 args(0) = to_ov (obj); 3131 args(0) = to_ov (obj);
3132 3132
3133 args = execute_ov (get_fcn, args, 1); 3133 args = execute_ov (get_fcn, args, 1);
3134 3134
3135 if (! error_state) 3135 if (! error_state)
3136 retval = args(0); 3136 retval = args(0);
3137 } 3137 }
3182 ::error ("cannot reference properties of class `%s' for non-constructed object", 3182 ::error ("cannot reference properties of class `%s' for non-constructed object",
3183 cls.get_name ().c_str ()); 3183 cls.get_name ().c_str ());
3184 return; 3184 return;
3185 } 3185 }
3186 } 3186 }
3187 3187
3188 octave_value set_fcn = get ("SetMethod"); 3188 octave_value set_fcn = get ("SetMethod");
3189 3189
3190 if (set_fcn.is_empty () || is_method_executing (set_fcn, obj)) 3190 if (set_fcn.is_empty () || is_method_executing (set_fcn, obj))
3191 obj.put (get ("Name").string_value (), val); 3191 obj.put (get ("Name").string_value (), val);
3192 else 3192 else