comparison libinterp/octave-value/ov-classdef.h @ 18692:fe0e34be5576

maint: untabify recently added code files. * Backend.cc, BaseControl.cc, ButtonControl.cc, Canvas.cc, Canvas.h, CheckBoxControl.cc, Container.cc, ContextMenu.cc, EditControl.cc, Figure.cc, Figure.h, GLCanvas.h, ListBoxControl.cc, Menu.cc, MouseModeActionGroup.cc, Object.cc, Object.h, ObjectFactory.cc, ObjectProxy.cc, Panel.cc, PopupMenuControl.cc, PushButtonControl.cc, PushTool.cc, QtHandlesUtils.cc, QtHandlesUtils.h, RadioButtonControl.cc, SliderControl.cc, TextControl.cc, ToggleButtonControl.cc, ToggleTool.cc, ToolBar.cc, ToolBarButton.cc, __init_qt__.cc, pt-jit.cc, ov-classdef.cc, ov-classdef.h: Untabify code.
author Rik <rik@octave.org>
date Sun, 27 Apr 2014 18:02:47 -0700
parents bcd71a2531d3
children
comparison
equal deleted inserted replaced
18691:9a6646cc7c3e 18692:fe0e34be5576
205 { rep->release (); } 205 { rep->release (); }
206 206
207 cdef_object& operator = (const cdef_object& obj) 207 cdef_object& operator = (const cdef_object& obj)
208 { 208 {
209 if (rep != obj.rep) 209 if (rep != obj.rep)
210 { 210 {
211 rep->release (); 211 rep->release ();
212 212
213 rep = obj.rep; 213 rep = obj.rep;
214 rep->refcount++; 214 rep->refcount++;
215 } 215 }
216 216
217 return *this; 217 return *this;
218 } 218 }
219 219
220 cdef_class get_class (void) const; 220 cdef_class get_class (void) const;
409 octave_value get (const std::string& pname) const 409 octave_value get (const std::string& pname) const
410 { 410 {
411 Cell val = map.contents (pname); 411 Cell val = map.contents (pname);
412 412
413 if (val.numel () > 0) 413 if (val.numel () > 0)
414 return val(0, 0); 414 return val(0, 0);
415 else 415 else
416 { 416 {
417 error ("get: unknown slot: %s", pname.c_str ()); 417 error ("get: unknown slot: %s", pname.c_str ());
418 return octave_value (); 418 return octave_value ();
419 } 419 }
420 } 420 }
421 421
422 octave_value_list 422 octave_value_list
423 subsref (const std::string& type, const std::list<octave_value_list>& idx, 423 subsref (const std::string& type, const std::list<octave_value_list>& idx,
424 int nargout, size_t& skip, const cdef_class& context, 424 int nargout, size_t& skip, const cdef_class& context,
616 class 616 class
617 cdef_class_rep : public cdef_meta_object_rep 617 cdef_class_rep : public cdef_meta_object_rep
618 { 618 {
619 public: 619 public:
620 cdef_class_rep (void) 620 cdef_class_rep (void)
621 : cdef_meta_object_rep (), member_count (0), handle_class (false), 621 : cdef_meta_object_rep (), member_count (0), handle_class (false),
622 object_count (0), meta (false) { } 622 object_count (0), meta (false) { }
623 623
624 cdef_class_rep (const std::list<cdef_class>& superclasses); 624 cdef_class_rep (const std::list<cdef_class>& superclasses);
625 625
626 cdef_object_rep* copy (void) const { return new cdef_class_rep (*this); } 626 cdef_object_rep* copy (void) const { return new cdef_class_rep (*this); }
779 cdef_class (const cdef_object& obj) 779 cdef_class (const cdef_object& obj)
780 : cdef_meta_object (obj) 780 : cdef_meta_object (obj)
781 { 781 {
782 // This should never happen... 782 // This should never happen...
783 if (! is_class ()) 783 if (! is_class ())
784 error ("internal error: invalid assignment from %s to meta.class object", 784 error ("internal error: invalid assignment from %s to meta.class object",
785 class_name ().c_str ()); 785 class_name ().c_str ());
786 } 786 }
787 787
788 cdef_class& operator = (const cdef_class& cls) 788 cdef_class& operator = (const cdef_class& cls)
789 { 789 {
790 cdef_object::operator= (cls); 790 cdef_object::operator= (cls);
910 class 910 class
911 cdef_property_rep : public cdef_meta_object_rep 911 cdef_property_rep : public cdef_meta_object_rep
912 { 912 {
913 public: 913 public:
914 cdef_property_rep (void) 914 cdef_property_rep (void)
915 : cdef_meta_object_rep () { } 915 : cdef_meta_object_rep () { }
916 916
917 cdef_object_rep* copy (void) const { return new cdef_property_rep (*this); } 917 cdef_object_rep* copy (void) const { return new cdef_property_rep (*this); }
918 918
919 bool is_property (void) const { return true; } 919 bool is_property (void) const { return true; }
920 920
965 cdef_property (const cdef_object& obj) 965 cdef_property (const cdef_object& obj)
966 : cdef_meta_object (obj) 966 : cdef_meta_object (obj)
967 { 967 {
968 // This should never happen... 968 // This should never happen...
969 if (! is_property ()) 969 if (! is_property ())
970 error ("internal error: invalid assignment from %s to meta.property object", 970 error ("internal error: invalid assignment from %s to meta.property object",
971 class_name ().c_str ()); 971 class_name ().c_str ());
972 } 972 }
973 973
974 cdef_property& operator = (const cdef_property& prop) 974 cdef_property& operator = (const cdef_property& prop)
975 { 975 {
976 cdef_object::operator= (prop); 976 cdef_object::operator= (prop);
1048 octave_value_list execute (const octave_value_list& args, int nargout, 1048 octave_value_list execute (const octave_value_list& args, int nargout,
1049 bool do_check_access = true, 1049 bool do_check_access = true,
1050 const std::string& who = std::string ()); 1050 const std::string& who = std::string ());
1051 1051
1052 octave_value_list execute (const cdef_object& obj, 1052 octave_value_list execute (const cdef_object& obj,
1053 const octave_value_list& args, int nargout, 1053 const octave_value_list& args, int nargout,
1054 bool do_check_access = true, 1054 bool do_check_access = true,
1055 const std::string& who = std::string ()); 1055 const std::string& who = std::string ());
1056 1056
1057 bool is_constructor (void) const; 1057 bool is_constructor (void) const;
1058 1058
1098 cdef_method (const cdef_object& obj) 1098 cdef_method (const cdef_object& obj)
1099 : cdef_meta_object (obj) 1099 : cdef_meta_object (obj)
1100 { 1100 {
1101 // This should never happen... 1101 // This should never happen...
1102 if (! is_method ()) 1102 if (! is_method ())
1103 error ("internal error: invalid assignment from %s to meta.method object", 1103 error ("internal error: invalid assignment from %s to meta.method object",
1104 class_name ().c_str ()); 1104 class_name ().c_str ());
1105 } 1105 }
1106 1106
1107 cdef_method& operator = (const cdef_method& meth) 1107 cdef_method& operator = (const cdef_method& meth)
1108 { 1108 {
1109 cdef_object::operator= (meth); 1109 cdef_object::operator= (meth);
1117 const std::string& who = std::string ()) 1117 const std::string& who = std::string ())
1118 { return get_rep ()->execute (args, nargout, do_check_access, who); } 1118 { return get_rep ()->execute (args, nargout, do_check_access, who); }
1119 1119
1120 /* dot-invokation: object is pushed as 1st argument */ 1120 /* dot-invokation: object is pushed as 1st argument */
1121 octave_value_list execute (const cdef_object& obj, 1121 octave_value_list execute (const cdef_object& obj,
1122 const octave_value_list& args, int nargout, 1122 const octave_value_list& args, int nargout,
1123 bool do_check_access = true, 1123 bool do_check_access = true,
1124 const std::string& who = std::string ()) 1124 const std::string& who = std::string ())
1125 { return get_rep ()->execute (obj, args, nargout, do_check_access, who); } 1125 { return get_rep ()->execute (obj, args, nargout, do_check_access, who); }
1126 1126
1127 bool check_access (void) const { return get_rep ()->check_access (); } 1127 bool check_access (void) const { return get_rep ()->check_access (); }
1334 cdef_package (const cdef_object& obj) 1334 cdef_package (const cdef_object& obj)
1335 : cdef_meta_object (obj) 1335 : cdef_meta_object (obj)
1336 { 1336 {
1337 // This should never happen... 1337 // This should never happen...
1338 if (! is_package ()) 1338 if (! is_package ())
1339 error ("internal error: invalid assignment from %s to meta.package object", 1339 error ("internal error: invalid assignment from %s to meta.package object",
1340 class_name ().c_str ()); 1340 class_name ().c_str ());
1341 } 1341 }
1342 1342
1343 cdef_package& operator = (const cdef_package& pack) 1343 cdef_package& operator = (const cdef_package& pack)
1344 { 1344 {
1345 cdef_object::operator= (pack); 1345 cdef_object::operator= (pack);
1421 1421
1422 void print_with_name (std::ostream& os, const std::string& name, 1422 void print_with_name (std::ostream& os, const std::string& name,
1423 bool print_padding = true); 1423 bool print_padding = true);
1424 1424
1425 octave_value_list subsref (const std::string& type, 1425 octave_value_list subsref (const std::string& type,
1426 const std::list<octave_value_list>& idx, 1426 const std::list<octave_value_list>& idx,
1427 int nargout); 1427 int nargout);
1428 1428
1429 octave_value subsref (const std::string& type, 1429 octave_value subsref (const std::string& type,
1430 const std::list<octave_value_list>& idx) 1430 const std::list<octave_value_list>& idx)
1431 { 1431 {
1432 octave_value_list retval = subsref (type, idx, 1); 1432 octave_value_list retval = subsref (type, idx, 1);
1433 return (retval.length () > 0 ? retval(0) : octave_value ()); 1433 return (retval.length () > 0 ? retval(0) : octave_value ());
1434 } 1434 }
1435 1435
1436 octave_value subsref (const std::string& type, 1436 octave_value subsref (const std::string& type,
1437 const std::list<octave_value_list>& idx, 1437 const std::list<octave_value_list>& idx,
1438 bool auto_add); 1438 bool auto_add);
1439 1439
1440 octave_value subsasgn (const std::string& type, 1440 octave_value subsasgn (const std::string& type,
1441 const std::list<octave_value_list>& idx, 1441 const std::list<octave_value_list>& idx,
1442 const octave_value& rhs); 1442 const octave_value& rhs);