# function.pl options: \$maxargs=${maxargs}
#
-# GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
+# GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$maxargs=14;
<<'END_OF_DECLARE_FUNCTION_MACRO','typename T${N}','const T${N} & p${N}','GiNaC::ex(p${N})');
#define DECLARE_FUNCTION_${N}P(NAME) \\
class NAME##_SERIAL { public: static unsigned serial; }; \\
+const unsigned NAME##_NPARAMS = ${N}; \\
template<${SEQ1}> const GiNaC::function NAME(${SEQ2}) { \\
return GiNaC::function(NAME##_SERIAL::serial, ${SEQ3}); \\
}
* Please do not modify it directly, edit the perl script instead!
* function.pl options: \$maxargs=${maxargs}
*
- * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __GINAC_FUNCTION_H__
#define REGISTER_FUNCTION(NAME,OPT) \\
unsigned NAME##_SERIAL::serial = \\
- GiNaC::function::register_new(GiNaC::function_options(#NAME).OPT);
+ GiNaC::function::register_new(GiNaC::function_options(#NAME, NAME##_NPARAMS).OPT);
namespace GiNaC {
public:
function_options();
function_options(std::string const & n, std::string const & tn=std::string());
+ function_options(std::string const & n, unsigned np);
~function_options();
void initialize();
* Please do not modify it directly, edit the perl script instead!
* function.pl options: \$maxargs=${maxargs}
*
- * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <iostream>
set_name(n, tn);
}
+function_options::function_options(std::string const & n, unsigned np)
+{
+ initialize();
+ set_name(n, std::string());
+ nparams = np;
+}
+
function_options::~function_options()
{
// nothing to clean up at the moment