diff libinterp/parse-tree/pt-classdef.cc @ 18288:b5be1a2aa5ab

Initial implementation for classdef methods in separate files. * libinterp/octave-value/ov-classdef.h (cdef_class::make_meta_class): New argument to tell whether the class is loaded from a @-folder. (cdef_method::cdef_method_rep::dispatch_type): New member used for external methods. (cdef_method::cdef_method_rep::cdef_method_rep): Initialize it. (cdef_method::cdef_method_rep::is_external, cdef_method::cdef_method_rep::mark_as_external): New methods, use it. (cdef_method::is_external, cdef_method::mark_as_external): Likewise. * libinterp/octave-value/ov-classdef.cc (is_dummy_method): New static method. (make_method): Use it to initialize "external" state of created method. (cdef_class::make_meta_class): New argument to know whether we're loading from a @-folder. Scan existing methods from load-path and create corresponding method entries in the class definition. (cdef_method::cdef_method_rep::check_method): Load external method if required. (cdef_method::cdef_method_rep::execute): Check error_state after calling check_method. * libinterp/parse-tree/pt-classdef.h (tree_classdef::make_meta_class): New argument to tell whether the class is loaded from a @-folder. * libinterp/parse-tree/pt-classdef.cc (tree_classdef::make_meta_class): Likewise. Pass new argument to cdef_class::make_meta_class. * libinterp/parse-tree/oct-parse.in.yy (parse_fcn_file): Pass new is_at_folder argument.
author Michael Goffioul <michael.goffioul@gmail.com>
date Sun, 12 Jan 2014 15:54:44 -0500
parents c4f5c781c3ca
children 4197fc428c7d
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-classdef.cc
+++ b/libinterp/parse-tree/pt-classdef.cc
@@ -233,10 +233,10 @@
 // Classdef
 
 octave_function*
-tree_classdef::make_meta_class (void)
+tree_classdef::make_meta_class (bool is_at_folder)
 {
   octave_value retval;
-  cdef_class cls = cdef_class::make_meta_class (this);
+  cdef_class cls = cdef_class::make_meta_class (this, is_at_folder);
 
   if (cls.ok ())
     return cls.get_constructor_function ();