Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1994, 1995, 1996, 1997, 1999, 2005, 2006, 2007, 2008, 2009 00004 John W. Eaton 00005 00006 This file is part of Octave. 00007 00008 Octave is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU General Public License as published by the 00010 Free Software Foundation; either version 3 of the License, or (at your 00011 option) any later version. 00012 00013 Octave is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Octave; see the file COPYING. If not, see 00020 <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #if !defined (octave_defun_dld_h) 00025 #define octave_defun_dld_h 1 00026 00027 #if defined (octave_defun_h) 00028 #error defun.h and defun-dld.h both included in same file! 00029 #endif 00030 00031 #include "defun-int.h" 00032 00033 // Define a builtin function that may be loaded dynamically at run 00034 // time. 00035 // 00036 // If Octave is not configured for dynamic linking of builtin 00037 // functions, this is the same as DEFUN, except that it will generate 00038 // an extra externally visible function. 00039 // 00040 // The first DECLARE_FUN is for the benefit of the installer function 00041 // and the second is for the definition of the function. 00042 00043 #if defined (MAKE_BUILTINS) 00044 00045 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ 00046 DEFUN_DLD_INTERNAL (name, args_name, nargout_name, doc) 00047 00048 // This one can be used when `name' cannot be used directly (if it is 00049 // already defined as a macro). In that case, name is already a 00050 // quoted string, and the internal name of the function must be passed 00051 // too (the convention is to use a prefix of "F", so "foo" becomes 00052 // "Ffoo") as well as the name of the generated installer function 00053 // (the convention is to use a prefix of "G", so "foo" becomes "Gfoo"). 00054 00055 #define DEFUNX_DLD(name, fname, gname, args_name, nargout_name, doc) \ 00056 DEFUNX_DLD_INTERNAL (name, fname, args_name, nargout_name, doc) 00057 00058 #else 00059 00060 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ 00061 DECLARE_FUN (name, args_name, nargout_name); \ 00062 DEFINE_FUN_INSTALLER_FUN (name, doc) \ 00063 DECLARE_FUN (name, args_name, nargout_name) 00064 00065 #define DEFUNX_DLD(name, fname, gname, args_name, nargout_name, doc) \ 00066 DECLARE_FUNX (fname, args_name, nargout_name); \ 00067 DEFINE_FUNX_INSTALLER_FUN (name, fname, gname, doc) \ 00068 DECLARE_FUNX (fname, args_name, nargout_name) 00069 00070 #endif 00071 00072 #endif 00073 00074 /* 00075 ;;; Local Variables: *** 00076 ;;; mode: C++ *** 00077 ;;; End: *** 00078 */