Mercurial > octave
diff libinterp/octave-value/ov-builtin.cc @ 22897:4090c32fccf8
store set of dispatch classes in built-in function objects
* ov-fcn.h (octave_function::push_dispatch_class,
octave_function::handles_dispatch_class): New virtual functions.
* ov-builtin.h, ov-builtin.cc (octave_builtin::push_dispatch_class,
octave_builtin::handles_dispatch_class): New functions.
* symtab.h, symtab.cc
(symbol_table::fcn_info::fcn_info_rep::install_built_in_dispatch):
Define in .cc file. Store class names in built-in function object
instead of class_methods.
(symbol_table::fcn_info::fcn_info_rep::load_class_method): Also search
for built-in functions that are declared to handle specific types.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 15 Dec 2016 22:04:11 -0500 |
parents | 3a2b891d0b33 |
children | f97e22a9012a |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-builtin.cc Thu Dec 15 21:53:28 2016 -0500 +++ b/libinterp/octave-value/ov-builtin.cc Thu Dec 15 22:04:11 2016 -0500 @@ -159,5 +159,17 @@ return f; } +void +octave_builtin::push_dispatch_class (const std::string& dispatch_type) +{ + dispatch_classes.insert (dispatch_type); +} + +bool +octave_builtin::handles_dispatch_class (const std::string& dispatch_type) const +{ + return dispatch_classes.find (dispatch_type) != dispatch_classes.end (); +} + const std::list<octave_lvalue> *octave_builtin::curr_lvalue_list = 0;