Mercurial > octave
diff libinterp/corefcn/interpreter-private.h @ 26863:c589db954a4e
new functions for getting a functicon from an octave_value object
These functions will replace extract_function. We need to have
something similar but that returns an octave_value object that
contains an octave_fcn_handle object, not a bare pointer to an
octave_function object.
* interpreter-private.h, interpreter-private.cc (get_function_handle):
New functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Mar 2019 02:49:52 +0000 |
parents | 568c2ab2782d |
children | 041caa61ed34 |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter-private.h Fri Feb 15 13:25:11 2019 +0100 +++ b/libinterp/corefcn/interpreter-private.h Fri Mar 08 02:49:52 2019 +0000 @@ -25,6 +25,7 @@ #include "octave-config.h" +#include <list> #include <string> #include "symtab.h" @@ -82,6 +83,24 @@ extern cdef_manager& __get_cdef_manager__ (const std::string& who); extern gtk_manager& __get_gtk_manager__ (const std::string& who); + + + // Functions that could be methods in the interpreter class but maybe + // shouldn't be exposed as part of the public interface. + + // Convert octave_value object ARG to be a function handle object. It + // may be a function handle, inline function, the name of a function, + // or the text of an inline function that has the given argument names + // PARAMETER_NAMES. The latter form is deprecated. + + octave_value + get_function_handle (octave::interpreter& interp, const octave_value& arg, + const std::string& parameter_name); + + octave_value + get_function_handle (octave::interpreter& interp, const octave_value& arg, + const std::list<std::string>& parameter_names + = std::list<std::string> ()); } #endif