diff libinterp/parse-tree/pt-classdef.h @ 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 932aca9a7c57
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-classdef.h
+++ b/libinterp/parse-tree/pt-classdef.h
@@ -628,7 +628,7 @@
 
   const std::string& package_name (void) const { return pack_name; }
 
-  octave_function* make_meta_class (void);
+  octave_function* make_meta_class (bool is_at_folder = false);
 
   tree_classdef *dup (symbol_table::scope_id scope,
                       symbol_table::context_id context) const;