Mercurial > hg > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
18287:69990d5edcc2 | 18288:b5be1a2aa5ab |
---|---|
626 octave_comment_list *leading_comment (void) { return lead_comm; } | 626 octave_comment_list *leading_comment (void) { return lead_comm; } |
627 octave_comment_list *trailing_comment (void) { return trail_comm; } | 627 octave_comment_list *trailing_comment (void) { return trail_comm; } |
628 | 628 |
629 const std::string& package_name (void) const { return pack_name; } | 629 const std::string& package_name (void) const { return pack_name; } |
630 | 630 |
631 octave_function* make_meta_class (void); | 631 octave_function* make_meta_class (bool is_at_folder = false); |
632 | 632 |
633 tree_classdef *dup (symbol_table::scope_id scope, | 633 tree_classdef *dup (symbol_table::scope_id scope, |
634 symbol_table::context_id context) const; | 634 symbol_table::context_id context) const; |
635 | 635 |
636 void accept (tree_walker& tw); | 636 void accept (tree_walker& tw); |