+ TeX_name = tn;
+ return *this;
+}
+
+// the following lines have been generated for max. ${maxargs} parameters
+$eval_func_implementation
+$evalf_func_implementation
+$derivative_func_implementation
+$series_func_implementation
+// end of generated lines
+
+function_options& function_options::eval_func(eval_funcp_exvector e)
+{
+ eval_use_exvector_args = true;
+ eval_f = eval_funcp(e);
+ return *this;
+}
+function_options& function_options::evalf_func(evalf_funcp_exvector ef)
+{
+ evalf_use_exvector_args = true;
+ evalf_f = evalf_funcp(ef);
+ return *this;
+}
+function_options& function_options::derivative_func(derivative_funcp_exvector d)
+{
+ derivative_use_exvector_args = true;
+ derivative_f = derivative_funcp(d);
+ return *this;
+}
+function_options& function_options::series_func(series_funcp_exvector s)
+{
+ series_use_exvector_args = true;
+ series_f = series_funcp(s);
+ return *this;
+}
+
+
+function_options & function_options::set_return_type(unsigned rt, unsigned rtt)
+{
+ use_return_type = true;
+ return_type = rt;
+ return_type_tinfo = rtt;
+ return *this;
+}
+
+function_options & function_options::do_not_evalf_params(void)
+{
+ evalf_params_first = false;
+ return *this;
+}
+
+function_options & function_options::remember(unsigned size,
+ unsigned assoc_size,
+ unsigned strategy)
+{
+ use_remember = true;
+ remember_size = size;
+ remember_assoc_size = assoc_size;
+ remember_strategy = strategy;
+ return *this;
+}
+
+function_options & function_options::overloaded(unsigned o)
+{
+ functions_with_same_name = o;
+ return *this;
+}
+
+function_options & function_options::set_symmetry(const symmetry & s)
+{
+ symtree = s;
+ return *this;
+}
+
+void function_options::test_and_set_nparams(unsigned n)
+{
+ if (nparams==0) {
+ nparams = n;
+ } else if (nparams!=n) {
+ // we do not throw an exception here because this code is
+ // usually executed before main(), so the exception could not
+ // caught anyhow
+ std::cerr << "WARNING: number of parameters ("
+ << n << ") differs from number set before ("
+ << nparams << ")" << std::endl;
+ }
+}
+
+/** This can be used as a hook for external applications. */
+unsigned function::current_serial = 0;
+
+
+GINAC_IMPLEMENT_REGISTERED_CLASS(function, exprseq)
+
+//////////
+// default ctor, dtor, copy ctor, assignment operator and helpers
+//////////
+
+// public
+
+function::function() : serial(0)
+{
+ tinfo_key = TINFO_function;