23 #if !defined (octave_defun_int_h)
24 #define octave_defun_int_h 1
39 const std::string& fcn);
43 const std::string& file,
const std::string& doc,
44 bool can_hide_function =
true);
49 bool relative =
false);
56 alias_builtin (
const std::string& alias,
const std::string& name);
81 #define DECLARE_FUNX(name, args_name, nargout_name) \
82 OCTAVE_EXPORT octave_value_list \
83 name (const octave_value_list& args_name, int nargout_name)
85 #define DECLARE_FUN(name, args_name, nargout_name) \
86 DECLARE_FUNX (F ## name, args_name, nargout_name)
97 #define DEFINE_FUN_INSTALLER_FUN(name, doc) \
98 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
100 #define DEFINE_FUNX_INSTALLER_FUN(name, fname, gname, doc) \
104 gname (const octave_shlib& shl, bool relative) \
106 octave_function *retval = 0; \
108 check_version (OCTAVE_API_VERSION, name); \
112 octave_dld_function *fcn = octave_dld_function::create (fname, shl, name, doc); \
115 fcn->mark_relative (); \
127 #if defined (MAKE_BUILTINS)
133 #define DEFUN_INTERNAL(name, args_name, nargout_name, doc) \
134 BEGIN_INSTALL_BUILTIN \
135 XDEFUN_INTERNAL (name, args_name, nargout_name, doc) \
138 #define DEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
139 BEGIN_INSTALL_BUILTIN \
140 XDEFCONSTFUN_INTERNAL (name, args_name, nargout_name, doc) \
143 #define DEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
144 BEGIN_INSTALL_BUILTIN \
145 XDEFUNX_INTERNAL (name, fname, args_name, nargout_name, doc) \
152 #define DEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) \
153 BEGIN_INSTALL_BUILTIN \
154 XDEFUN_DLD_INTERNAL (name, args_name, nargout_name, doc) \
157 #define DEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc) \
158 BEGIN_INSTALL_BUILTIN \
159 XDEFUNX_DLD_INTERNAL (name, fname, args_name, nargout_name, doc) \
164 #define DEFALIAS_INTERNAL(alias, name) \
165 BEGIN_INSTALL_BUILTIN \
166 XDEFALIAS_INTERNAL(alias, name) \
174 #define DEFUN_INTERNAL(name, args_name, nargout_name, doc) \
175 DECLARE_FUN (name, args_name, nargout_name)
177 #define DEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
178 DECLARE_FUN (name, args_name, nargout_name)
180 #define DEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
181 DECLARE_FUNX (fname, args_name, nargout_name)
185 #define DEFALIAS_INTERNAL(alias, name)
octave_value_list(* fcn)(const octave_value_list &, int)
OCTINTERP_API void install_builtin_function(octave_builtin::fcn f, const std::string &name, const std::string &file, const std::string &doc, bool can_hide_function=true)
octave_auto_shlib(const octave_shlib &shl)
OCTINTERP_API void print_usage(void)
OCTINTERP_API void alias_builtin(const std::string &alias, const std::string &name)
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
bool(* octave_dld_fcn_installer)(const octave_shlib &, bool relative)
F77_RET_T const double const double * f
OCTINTERP_API void check_version(const std::string &version, const std::string &fcn)
OCTINTERP_API void install_mex_function(void *fptr, bool fmex, const std::string &name, const octave_shlib &shl, bool relative=false)
OCTINTERP_API void install_dld_function(octave_dld_function::fcn f, const std::string &name, const octave_shlib &shl, const std::string &doc, bool relative=false)
OCTINTERP_API octave_shlib get_current_shlib(void)
OCTINTERP_API bool defun_isargout(int, int)