26 #if ! defined (octave_defun_int_h)
27 #define octave_defun_int_h 1
29 #include "octave-config.h"
45 extern OCTINTERP_API
void print_usage (
const std::string&);
47 extern OCTINTERP_API
void check_version (
const std::string& version,
48 const std::string& fcn);
50 extern OCTINTERP_API
void
53 bool relative =
false);
55 extern OCTINTERP_API
void
58 bool relative =
false);
60 extern OCTINTERP_API
void
86 #define FORWARD_DECLARE_FUNX(name) \
87 extern OCTAVE_EXPORT octave_value_list \
88 name (const octave_value_list&, int)
90 #define FORWARD_DECLARE_METHODX(name) \
91 extern OCTAVE_EXPORT octave_value_list \
92 name (octave::interpreter&, const octave_value_list&, int)
94 #define FORWARD_DECLARE_FUN(name) \
95 FORWARD_DECLARE_FUNX (F ## name)
97 #define FORWARD_DECLARE_METHOD(name) \
98 FORWARD_DECLARE_METHODX (F ## name)
100 #define DECLARE_FUNX(name, args_name, nargout_name) \
101 OCTAVE_EXPORT octave_value_list \
102 name (const octave_value_list& args_name, int nargout_name)
104 #define DECLARE_METHODX(name, interp_name, args_name, nargout_name) \
105 OCTAVE_EXPORT octave_value_list \
106 name (octave::interpreter& interp_name, \
107 const octave_value_list& args_name, int nargout_name)
109 #define DECLARE_FUN(name, args_name, nargout_name) \
110 DECLARE_FUNX (F ## name, args_name, nargout_name)
112 #define DECLARE_METHOD(name, interp_name, args_name, nargout_name) \
113 DECLARE_METHODX (F ## name, interp_name, args_name, nargout_name)
115 #define DECLARE_STATIC_FUNX(name, args_name, nargout_name) \
116 static octave_value_list \
117 name (const octave_value_list& args_name, int nargout_name)
119 #define DECLARE_STATIC_METHODX(name, interp_name, args_name, nargout_name) \
120 static octave_value_list \
121 name (octave::interpreter& interp_name, \
122 const octave_value_list& args_name, int nargout_name)
124 #define DECLARE_STATIC_FUN(name, args_name, nargout_name) \
125 DECLARE_STATIC_FUNX (F ## name, args_name, nargout_name)
127 #define DECLARE_STATIC_METHOD(name, interp_name, args_name, nargout_name) \
128 DECLARE_STATIC_METHODX (F ## name, interp_name, args_name, nargout_name)
139 #if defined (OCTAVE_SOURCE)
140 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \
141 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, "external-doc")
143 # define DEFINE_FUN_INSTALLER_FUN(name, doc) \
144 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
147 #define DEFINE_FUNX_INSTALLER_FUN(name, fname, gname, doc) \
151 gname (const octave::dynamic_library& shl, bool relative) \
153 check_version (OCTAVE_API_VERSION, name); \
155 octave_dld_function *fcn \
156 = octave_dld_function::create (fname, shl, name, doc); \
159 fcn->mark_relative (); \
auto_shlib(const dynamic_library &shl)
octave_value_list(* fcn)(const octave_value_list &, int)
octave_value_list(* meth)(octave::interpreter &, const octave_value_list &, int)
OCTINTERP_API void install_dld_function(octave_dld_function::fcn f, const std::string &name, const octave::dynamic_library &shl, const std::string &doc, bool relative=false)
bool(* octave_dld_fcn_installer)(const octave::dynamic_library &, bool relative)
OCTINTERP_API void print_usage(void)
OCTINTERP_API void check_version(const std::string &version, const std::string &fcn)
OCTINTERP_API octave::dynamic_library get_current_shlib(void)
OCTINTERP_API void install_mex_function(void *fptr, bool fmex, const std::string &name, const octave::dynamic_library &shl, bool relative=false)
F77_RET_T const F77_DBLE const F77_DBLE * f
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)